Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Clean URLs with PHP how do you do this?

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Watch

fro0ty

Established Member
Impact
1
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I believe you have to edit the .htaccess or something like that.. Not 100% sure.
 
0
Close
I would just make a new folder called contact, then rename contact.php to index.php so it loads when you go to /contact

Unless I'm missing something?

e39m5
 
0
Close
Well, unless the content is dynamic I guess it would work.. clever!
 
0
Close
Its done with mod_rewrite,

place this into your htaccess file (edit as needed).

Code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule contact/$ /contact.php
 
0
Close
you could always set error handler to a custom script that checks the existance of the file (taking off the last slash and adding .php) if it does not exist do a 404 if it does forward to it.

Although rmwebs code would be better.
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back