PDA

View Full Version : URL with no extensions



matty-j
03-18-2008, 05:21 PM
Hey All,

I did some searching on this forum, but couldn't really find a solution. I was wondering if anybody knows how to get extensionless URLs to work with Bluehost. i.e. if someone typed in www.mydomain.com/supercoolpage, supercoolpage.php would load instead of giving a 404 error.

I did some Googling and tried adding:

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(([^./]+)+)/?$ /$1.php [L]

To my .htaccess file, but it doesn't work.

Any ideas?

Thanks,
Matt

Basil
03-19-2008, 07:52 AM
Did you put "rewriteengine on" in front of it?

matty-j
03-19-2008, 09:13 AM
LOL turns out I'm an idiot. All the search results I found mentioned nothing of that line. I'm pretty new to the whole htaccess thing. Thanks for the help!