ToroPHP icon indicating copy to clipboard operation
ToroPHP copied to clipboard

Alternative .htaccess code

Open SamM opened this issue 11 years ago • 3 comments

I'm using Apache version 2.2.24 and for some reason neither of the two snippets of code that you posted to use in my .htaccess were working properly. On another server (Apache 2.2.19) the "FallbackResource /index.php" worked perfectly, but it didn't work well on my server.

Here's the code I found that worked for on my server:

RewriteBase /INSERT/PATH/TO/BASE/DIRECTORY RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 !^(index.php) RewriteRule .* index.php/$0 [L]

Without the RewriteBase all I got was a 404 error ".../index.php/ was not found".

SamM avatar Feb 05 '14 03:02 SamM

This is probably related to the issue I just posted [https://github.com/anandkunal/ToroPHP/issues/78]. This might be a better fix than removing the code I suggested. I'm about to test it and will report back.

codazoda avatar Feb 14 '14 15:02 codazoda

As a follow-up, this rewrite rule is better than the alternative I found but it does not fix bug [https://github.com/anandkunal/ToroPHP/issues/78].

codazoda avatar Feb 14 '14 15:02 codazoda

I added documentation to the readme with this alternative and submitted pull request [https://github.com/anandkunal/ToroPHP/pull/79]. This is my first pull request for this project so feel free to slap me if I did something wrong.

codazoda avatar Feb 14 '14 17:02 codazoda