Reputation: 48751
I've this in my .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /test/
RewriteCond %{REQUEST_URI} !(panel/index.php)
RewriteRule ^panel/(.*)$ panel/index.php/$1/ [L]
</IfModule>
I want to tunnel all links containing panel/(.*)
to panel/index.php
for controlling them.
Above rules works except if url is http://localhost/test/panel/
! that it redirects to :
http://localhost/test/panel/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/
Helps needed.
Upvotes: 0
Views: 69
Reputation: 3149
try this
<IfModule mod_rewrite.c>
RewriteEngine On
#skip rewrite for index.php
RewriteRule ^panel/index.php(.*)$ - [S=1,L]
RewriteRule ^panel/(.*)$ panel/index.php/$1/ [L]
</IfModule>
Upvotes: 1