kobo1d: .htaccess problem

well i have allready an .htaccess file for some kind of website maintance..
it looks like this ->

RewriteEngine on
RewriteCond %{REMOTE_ADDR} !=111.222.333.444
RewriteCond %{REQUEST_URI} !=/303.php [NC]
RewriteRule ^(.*)$ /303.php [R=302,NC,L]

no how can i exclude 1 or 2 directories from this rule ?
like only the patch /users/files stays aviable and the rest gets redirected!

plz help!

thx

  1. Hi,

    RewriteEngine on
    RewriteCond %{REMOTE_ADDR} !=111.222.333.444
    RewriteCond %{REQUEST_URI} !=/303.php [NC]
    RewriteRule ^(.*)$ /303.php [R=302,NC,L]

    Very similar to the way you already excluded /303.php itself:

    RewriteEngine on  
    RewriteCond %{REMOTE_ADDR} !=111.222.333.444  
    RewriteCond %{REQUEST_URI} !=/303.php [NC]  
    RewriteCond %{REQUEST_URI} !^/users(/|$)  
    RewriteRule ^(.*)$ /303.php [R=302,NC,L]
    

    Here, the ^/users(/|$) is a regular expression (saying "/users" followed either by "/" or nothing, so "/users", "/users/", "/users/..." will match but "/usersfoo" will not) instead of a fixed string like =/303.php.

    Regards,
    Christian

    PS: Please note that this is usually a German forum and while quite a few people here speak English, generally you may have more luck finding help in English elsewhere.