URL Rewrite problem. (Many directory)

Posted by marharépa on Stack Overflow See other posts from Stack Overflow or by marharépa
Published on 2010-04-20T17:12:25Z Indexed on 2010/04/20 20:03 UTC
Read the original article Hit count: 212

Filed under:
|
|

Hello!

I'd like to make a htaccess file, which can make a good structure for my websites.

My .htaccess is now:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$
RewriteCond %{REQUEST_URI} !^/admin/*
RewriteRule ^(.*)$ index.php?q=$1 [QSA]

(based on Sombat's comment)

And I want to make this, with it:

for every elements but (jpg|jpeg|gif|png|css|js|pl|txt)

if domain.xx/admin redirect to the domain.xx/admin directory and don't make a rewrite at all i mean: let me use domain.xx/admin/index.php?asd=1&asdd=2

else rewrite everything as rule one, to index.php.

Thanks for the help.

© Stack Overflow or respective owner

Related posts about url-rewriting

Related posts about php