Mod_rewrite and DirectoryIndex Issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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&param=$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@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux