Bug 63376 - .htaccess rewriterule is going in a infinity loop when [p]
Summary: .htaccess rewriterule is going in a infinity loop when [p]
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.4.34
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2019-04-23 08:53 UTC by chatis
Modified: 2019-04-23 08:54 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description chatis 2019-04-23 08:53:41 UTC
in a domain, I have a .htaccess that is configured like this :

RewriteEngine on
RewriteRule ^admin$ /admin/ [R,L]

RewriteRule (.*) http://www.example.com/sf2/sub/%{REQUEST_URI}?%{QUERY_STRING}&id=7 [P]

in the old server, this is working very well, but in the new server, the rule is going in a loop and it's impossible to come in the website.

When I open the page, I have this error :

You don't have permission to access /sf2/sub/sf2/sub/sf2/sub/......./sf2/sub/sub.php

As you can see, the rule is calling infinity time !!! and I want only one time. 

I know that this is nothing to do with .htaccess because this is working well in other server that call the same file.

this is only not working when the both domains are in the same server. When the domain is external of example.com, this is working well