views:

234

answers:

2

I have a .htaccess in my root of website that looks like this:

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.mydomain\.pl [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?([a-z0-9_-]+)\.mydomain\.pl [NC]
RewriteRule ^/?$ /index.php?run=places/%1 [L,QSA]

RewriteCond %{REQUEST_URI} !^/index.php$
RewriteCond %{REQUEST_URI} !^/images/
RewriteCond %{REQUEST_URI} !^/upload/
RewriteCond %{REQUEST_URI} !^/javascript/
RewriteRule ^(.*)$ /index.php?runit=$1 [L,QSA]

But when I type:

mydomain.pl/guests

I would like to go normally to actual folder guests. I understand that I need to somehow disable this rule for guests subfolder, but how do I do this?

EDIT:

I've included whole .htaccess file

A: 

Add one of these

RewriteEngine On

#If the request starts with guests, then pass it through
RewriteCond %{REQUEST_URI} ^guests
RewriteRule ^ - [L,QSA]

#Or, if the request contains an existing filename or directory, pass it through
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L,QSA]
Vinko Vrsalovic
Do I need to restart server? I did it and it is not working.
tomaszs
Depends on where are the rules placed. Is it htaccess or main configuration files? Also, are those all your rules?
Vinko Vrsalovic
@Vinko - Thank you for answer I've included my whole htaccess file. How to change it so it will work?
tomaszs
It does not work
tomaszs
When I type http://mydomain.pl/guests i'm redirected to http://mydomain.pl/guests/?runit=guests and I wanted to go to mydomain.pl/guests/ normally (load index.php from inside)
tomaszs
So it works, but it appends the query string? Then do not use QSA
Vinko Vrsalovic
+1  A: 

I've put a htaccess in subfolder and added RewriteEngine Off and it works.

tomaszs