You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Christian Cioni <ch...@staff.aruba.it> on 2012/10/04 23:58:32 UTC
[users@httpd] Mod_rewrite and DirectoryIndex Issue
Hi,
in apache 2.2 this configuration in .htaccess file work properly.
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/folder1
RewriteCond %{REQUEST_URI} !^/folder2
RewriteCond %{REQUEST_URI} !^/folder3
RewriteRule ^(.*)$ folder2/$1 [L]
When open http://www.mywebsite.com/, I'm redirect directly in
folder2 folder
or
RewriteEngine On
RewriteRule ^securecode.png captcha/code.php [L]
RewriteRule ^(.*)\/([0-9]*)\/(.*)$
template.php?pagina=$1¶m=$2&altro=$3 [L]
RewriteRule ^(.*)\/(page=)([0-9]*)$ template.php?pagina=$1&page=$3
[L]
RewriteRule ^(.*).htm$ template.php?pagina=$1 [QSA]
RewriteRule ^$ template.php [L]
When open http://www.mywebsite.com/, I'm redirect directly to
template.php
in apache 2.4, while running the RewriteRule adds to the request,
the first index file, which matches the priority of the DirectoryIndex
in apache 2.4, while running the RewriteRule adds to the request,
the first index file, which matches the priority of the DirectoryIndex
if set DirectoryIndex index.html index.htm index.php and in root have
index.htm, in the first case
the rewrite rules call http://www.mywebsite.com/folder2/index.htm with error
404 because in folder2 have index.php, and DirectoryIndex isn't reloaded in
folder2,
in the second case open http://www.mywebsite.com/index.htm, instead of
http://www.mywebsite.com/template.php.
Is there a way to replicate the behavior of Apache 2.2?
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Mod_rewrite and DirectoryIndex Issue
Posted by Eric Covener <co...@gmail.com>.
is there anyway you can help isolate this by building mod_rewrite from
2.2 on top of 2.4 and reporting whether it's affected?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org