Thread: Shorter URLs
View Single Post
Old 06-06-2006, 05:11 PM   · #8
vincenzo
NamePros Regular
 
Location: London, UK
Trader Rating: (38)
Join Date: May 2006
Posts: 577
NP$: 0.00 (Donate)
vincenzo is a glorious beacon of lightvincenzo is a glorious beacon of lightvincenzo is a glorious beacon of lightvincenzo is a glorious beacon of lightvincenzo is a glorious beacon of lightvincenzo is a glorious beacon of light
What about using the mod_rewrite method:

PHP Code:
Add this to the .htaccess file on the root of your server:

RewriteEngine on
RewriteBase
/
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond
%{REQUEST_URI} !/$
RewriteRule (.*) $1.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule
^(.+)/$ /$1 [R=301,L]


That should just strip out the php extension of evry file.

- Vince


Please register or log-in into NamePros to hide ads
vincenzo is offline   Reply With Quote
Site Sponsors
http://www.mobisitetrader.com/ Exdon Hunting Moon
Advertise your business at NamePros
All times are GMT -7. The time now is 11:25 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.