Closed Thread
Rewrite root/filename.php to root/filename in .htaccess
Old 10-08-2009, 09:40 AM Question Rewrite root/filename.php to root/filename in .htaccess
Junior Talker

Posts: 2
Trades: 0
Hello, this is my first post here

I want to rewrite root/filename.php to root/filename in .htaccess
basically I want to have all my php pages in the root folder but when you open them i want to hide the .php extension (somekind of virtual subdir).. How can I do this? Thank You!
mastermindsro is offline
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 10-08-2009, 10:24 AM Re: Rewrite root/filename.php to root/filename in .htaccess
Junior Talker

Posts: 2
Trades: 0
Ok, I finally found it after googling some more
So if you want the same thing, just add the following code to .htaccess in root

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
mastermindsro is offline
View Public Profile
 
Closed Thread     « Reply to Rewrite root/filename.php to root/filename in .htaccess
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.09695 seconds with 13 queries