...

View Full Version : url shortener doesnt work



docock
09-21-2011, 02:04 AM
I want to implement the coding below in my website, to shorten the urls.



RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php


However, I tried implementing it without result. For example.. when I type: www.mysite.com/products it takes me to my hosts main page instead of www.mysite.com/products.php (which exists).

My complete coding:


# Do not remove this line, otherwise mod_rewrite rules will stop working
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php


The rewritebase line was allready in the htaccess file, im not sure whether to remove it since there is a warning stated.

How come the url shortener doesn't work?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum