jeudi 31 mars 2016

.htaccess to hide 2 folder paths

I am having difficulties getting the second statement working regarding admins, i am trying to hide both new and admin parts of the directory. new seems to be hiding fine however admin doesnt want to know. IS the first rule for new almost blocking the second one? Is it possible to have the two combined so thestatement would read if either new or admins then hide...?

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+new/([^\s]+) [NC]
RewriteRule ^ %1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (?!^new/)^(.*)$ /new/$1 [L,NC]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+admins/([^\s]+) [NC]
RewriteRule ^ %1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (?!^admins/)^(.*)$ /admins/$1 [L,NC]




Aucun commentaire:

Enregistrer un commentaire