Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



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
 
 
Register now for full access!
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.09440 seconds with 12 queries