Forum Moderators: phranque
I have been trying to figure this out since last couple of months, and rightnow after continous try of 11 hours, I am giving it up. please help me why its not working.
I want to make SEF urls by the following method. Here is the code in my .htaccess file.
<Files test>
ForceType application/x-httpd-php
</Files>
I have a file on server called "test" without any extension. When I try to execture this file, it gives me "500 - Internal Server Error". I have seen most of the people are using it, but when I try it does not work. I have also tried the following code in my .htaccess file
<FilesMatch "^test$">
ForceType application/x-httpd-php
</FilesMatch>
the code in my "test" files is
<? echo "this is a test..";?>
but it also gives the same error. I tried AddHandler application/x-httpd-php .ali so if any file thats has .ali extension works fine and executes as .php but why not if there isnt any file extension.
I would be extremely thankful to anyone who can help me figure this out.
thank you.
regards
- Ali..
I have found a solution, and I am sure this will help most of people, because I see everywhere people have the same problem but there isnt any answer to this.
here is the code to use in your .htacces file..
AddHandler server-parsed .php
<Files ~ "^[^\.]+$">
SetHandler application/x-httpd-php
</Files>
AddHandler application/x-httpd-php .php
I know nothing about nature of apache, but it worked for me, and I am sure it will work for any others as well.
cheers
- Ali :)
[edited by: jdMorgan at 1:42 pm (utc) on Sep. 4, 2005]
[edit reason] Removed URL per TOS. [/edit]