htaccess looping

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

 



Hi, I've got problem with htaccess configuration. On my site i have 3 types of access

http://zeroproblem.pl -> direct to directory test2/index.php (which is file)
http://zeroproblem.pl/zeroproblem -> direct to directory test2/zeroproblem (which is directory)
http://zeroproblem.pl/admin -> is parameter and it should be like index.php?url=admin

my htaccess file:
php_flag  display_errors        on
Options -Indexes
Options -MultiViews
RewriteEngine On

#RewriteBase /test2/zeroproblem/
#usunięcie www.
RewriteCond %{HTTP_HOST} ^(www\.)zeroproblem\.pl$ [NC]
RewriteRule ^(.*)$ http://zeroproblem.pl/$1 [R=301,L]

# zeroproblem.pl/zeroproblem  - err 404 workaround for forbiden file

RewriteCond %{HTTP_HOST} ^(www\.)?zeroproblem\.pl$ [NC]
RewriteCond %{REQUEST_URI} ^/(.*)$ [NC]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule ^(.*)$ /index.php [QSA,L] 

# zeroproblem/admin
RewriteCond %{HTTP_HOST} ^(www\.)?zeroproblem\.pl$ 
RewriteCond %{REQUEST_URI} ^/(.*)$ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-l 
RewriteRule ^(.*)$ /index.php?url=$1 [L,QSA] 

Above code is working, but problem is that when I'm starting new session on for ex. openinig http://zeroproblem.pl/index.php the page is loading 3 times. After many tests I found that problem is with 
RewriteCond %{REQUEST_FILENAME} !-f 
but I need that line for getitng to http://zeroproblem.pl/admin which is just parameter.
Please help me to understand problem.

P.S. My site is on sharing host, and I dont have access to conf.

Regards
Marek Słoboda 



---------------------------------------------------------------------
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