I have created a symlink (using ln -s index.php test) to my index.php to try and get a 'prettier' url without the .php extension. However, when I access https://myservername.com/test I get served the raw php file instead of the interpreted content.
I would like to avoid having to turn on mod_rewrite if possible since it will be for this one file only (I am using the CodeIgniter framework that does the url translation for the rest of the files).
Is there a way for apache to read the real destination file instead of the symlink to determine that it is a php script? Is there a better way of accomplishing this?
I bet the problem is that Apache is only calling the PHP interpreter on files with a .php extension, and since your symlinks have no extension whatsoever they aren't interpreted.
Try using mod_rewrite instead, or try messing around with Apache directives, like FollowSymLinks - not sure if it applies here though. You don't want to enable the PHP parser for all files, that's for sure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With