httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marek Sloboda" <>
Subject [users@httpd] htaccess looping
Date Wed, 13 Sep 2017 14:01:29 GMT
Hi, I've got problem with htaccess configuration. On my site i have 3 types of access -> direct to directory test2/index.php (which is file) -> direct to directory test2/zeroproblem (which is directory) -> 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 ^(.*)$$1 [R=301,L]

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

Marek Słoboda 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message