PHP files not being served from an aliased directory
I have a brief to merge two php based websites into one - where the second site is to be served in a sub-folder of the main domain rather than a subdomain.
I have set up an alias to point a particular folder to the second website.
Alias "/distribution" /path/to/second/webroot/folder/
This is working fine for .html files, but any request for a .php file in this aliased folder redirects to the main website's top level domain. Even if that php file only contains an exit('test');
e.g. a request for redirects to domain.com without touching the file.
The same alias method works fine on my local apache / php set-up.
Any ideas how to get the php files to run correctly in this scenario?
-
Hey there! That's definitely odd, and not something I would expect to happen in normal circumstances. Do you see anything odd in the Apache error log file (/etc/apache2/logs/error_log) when you try and access the test.php page? Do you have anything in the .htaccess file that could be routing PHP pages differently? 0 -
Thank you @cPRex it was a permissions issue I'd checked the project out of git and not noticed it'd gained group writeable permissions. The nudge to look in the server wide error log signalled the issue. 0 -
I'm glad that helped to track it down! 0
Please sign in to leave a comment.
Comments
3 comments