Mar
19
Remove File Extension Using htaccess
March 19, 2008 |
There are times that you don’t want to give visitors a clue what the programming language you are using. This can be easily achieved. Take a look at the code below:
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /$1.php [L,QSA]
In this example, this will completely remove the file extension from your URL such as example instead of example.php
Similar Posts
- Use htaccess to Fake Different File Extension
- Use htaccess with Site Maintenance Page
- htaccess Conditional Loop Redirect
- Apache htaccess Prevent Users from Uploading and Executing Files
- Google Text Translation Using htaccess
- htaccess Deny Diractory Access During a Specific Time
- htaccess Remove the www From Domain URL
- htaccess Permanently redirect file or directory
- Block people from Certain URL Using htaccess
- htaccess Limit the Number of Concurrent Visitors to your Website
- htaccess Require the www For Domain URL
- Use htaccess for 404 Redirect
- htaccess Explicitly Define Default Index File
- Use htaccess to Deny Access to hidden Files
- Use htaccess to Deny Access Directory Listing
- Create Custom Error Pages Using htaccess PHP
- Set Local Timezone Using htaccess
- Deny Access to inc Files Using htaccess
- htaccess gzip for Faster Loading and Bandwidth Saving
- Block IPs Using htaccess
- Force Files Like PDF Download using htaccess
Comments
1 Comment so far



































Very Usefull İnfo. I used this feaure on this site http://property.theartofbronzeland.com