Need a small URL toolkit help: Trailing slash after /index.php
Gilad
31 January 2019, 12:24
Hi, For some reason my cakephp app insists on adding a trailing slash when it redirects to the index. So I get: http://mysite.com/index.php/ which gives a 404 error.
The toolkit now: RequestURI exists Return Match ^/index\.php/ Rewrite /index.php Match ^/index.php/ Rewrite /index.php Match /index.php/ Rewrite /index.php Match .*\?(.*) Rewrite /index.php?$1 Match .* Rewrite /index.php
As you can see - I've tried to attend the trailing slash but it doesn't seem to work.
Any advice? Hugo?
Thanks!!
Hugo Leisink
1 February 2019, 18:00
Use the following setting for your virtual host.
EnablePathInfo = yes
Gilad
1 February 2019, 20:22
Thanks Hugo but it's already set to yes and still fails when it goes to /index.php/ Any other suggestions I can maybe try?
Gilad
4 February 2019, 07:19
Small follow up: Seems that cakephp insists on redirecting to /index.php/ On Apache2 seems that the following rules work RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L]