Welcome Guest, Not a member yet? Register   Sign In
Can't configure 'remove index.php'
#7

(This post was last modified: 10-20-2016, 09:19 AM by planteg.)

Hi Dave,

from https://docs.bolt.cm/3.0/howto/making-su...cess-works I got the clue to check if Apache configuration enables .htaccess. In fact that was turned of. I changed this in apache2.conf:

Code:
<Directory "/var/www/htdocs">
   AllowOverride None

I changed None to All and got some results. The first .htaccess file accessed is in /var/www, and the second one is in /var/www/html. But then I get the AH00124 error: exceeded the limit of 10 internal redirects. Looks like it's lost somewhere in the forest. Having rewrites to log to level3, I learned that the server loops doing rewrite until the limit is reached.

On top of that, the rewrite is done wrong at the beginning:


Code:
strip per-dir prefix: /var/www/html/wactrl -> html/wactrl
applying patern '.' to uri 'html/wactrl'
rewrite 'html/wactrl' -> 'index.php'
add per-dir prefix index.php/ -> /var/www/index.php'
internal redirect with /var/www/index.php/ [INTERNAL REDIRECT]

Right after this, all of this is done again until the limit is reached.
As far as I understand, the URI from the received is /var/www/html/wactrl, where wactrl is the controller name. Once edited, that should become /var/www/html/index.php/wactrl right ? But it does not. What is wrong ?

And why is there a loop inside /var/www ?

EDIT ON October 20th

Finally made it work. The problem was the RewriteRule. I changed it to:
Code:
RewriteRule html html/index.php

Then /var/www/html/wactrl is changed to /var/www/html/index.php/wactrl

In short RewriteRule line is:[img]file:///Desktop/regex.jpg[/img]

RewriteRule SearchExpression ReplaceExpression

where SearchExpression is the part of the URI to be replaced by ReplaceExpression. This is the short story because both expression can use regular expression.

If you wish to test what you need, go https://regex101.com/ You can test drive your expressions live until you are satisfied. A screen shot is attached.

Thanks

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
Can't configure 'remove index.php' - by planteg - 10-18-2016, 07:42 AM
RE: Can't configure 'remove index.php' - by planteg - 10-19-2016, 12:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB