PDA

View Full Version : Tutorial #2 - Non-Extension URL's


ilyas415
16th August 2007, 07:57 PM
Some people find this type of Tutorial very useful
Okay basically what the following peice of code will do is force the apache server to recognise an extensionless file as a .php file. For example, with this code i can create a file called Index instead of index.php
The Index file will still be considered a php file by the server.

CODE:

# All extension-less files are PHP code
<Files ~ "^[^\.]+$">
ForceType application/x-httpd-php
</Files>


This can also be done with other types of scripts, e.g. javascript, aspx etc.
I think this code only works for Apache servers but im not totally sure. If you dont have an apache server, then try this anyway, i hope it works for you.