how to remove .php from a certain file (with apache .htaccess)
- by user2015253
I want a certain file (only this!) to remove the php extension for calling it. BUT: It uses get parameters and they should remain!
I tried it with my .htaccess and something like: RewriteEngine on followed by either
RewriteRule ^file(.*)$ file.php$1
or
RewriteRule ^file(.+)$ file.php$1
but it doesn't work. (First gives error 500, second gives 404)
Example what I want to call in the browser:
file?param=asd&foo=bar
- It should call as:
file.php?param=asd&foo=bar