I have strange problem with .htaccess I can’t solve:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1
RewriteRule watermelonurltest wmelon/core/works.html
</IfModule>
When watermelonurltest is accessed, it loops to something like:
http://localhost/w/watermelonurltest/index.php/2/index.php/2/index.php/2/index.php/2/index.php/2/index.php/2/index.php/2/(...)
Which suggests that RewriteRule ^(.*)$ index.php?/$1 is applied instead of RewriteRule watermelonurltest wmelon/core/works.html
I tried to swap these two rules, but then other problems like this one occur.
The problem didn’t exist when the first rule was
RewriteRule ^(.*)$ index.php/$1
(no question mark after .php)
For some reason, this question mark breaks it.
I can’t figure out why this happens and how to fix it – I tried googling a little, but I didn’t find anything helpful.
Thanks in advance.
https://www.communitymx.com/content/article.cfm?cid=51C62&print=true