views:

55

answers:

1

Hi, I'm running zend server on windows 7. I'm using the htaccess from jooml:

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]

RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]

RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]

RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]

RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})

RewriteRule ^(.*)$ index.php [F,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

when I'm calling this url: http://localhost/ABC/ the data is been redirect to index.php

but if I'm creating the folder ABC the server is showing the ABC folder content and not redirecting the data back to index.php.

how can I prevent that, I want all the calls data to be directed into index.php?

Thanks

A: 

These two lines

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

exclude existing files and directories from the rule. Remove them and you should be all right.

Pekka
Thanks - but that ain't working.I'm still getting the ABC folder content even after excluding these lines.Any suggestions?
Eldad
I think you need to remove `RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]` as well, but that will make literally *every* resource (including image files etc.) run through index.php. Is that what you want? It's not very good for performance.
Pekka
What I need is that only php/php5/html/htm files and dirs will run through..
Eldad