Results 1 to 1 of 1
Sep 3, 2012, 21:37 #1
- Join Date
- Dec 2007
- 0 Post(s)
- 0 Thread(s)
htaccess ignoring my rules and getting by
I've done this htaccess file with a few rewrite rules, but problem is, i'm able to access individual .php files on the server as well a directly access sections like domain.com/admin/change_profile.php
Is this normal? I thought this was not supposed to happen. How do I do this htaccess file so that only if a rule is fulfilled it'll take me to that folder? In short: disallow direct access to domain.com/admin/change_profile.php or domain.com/admin/ or anything else.
RewriteEngine on RewriteRule ^/?(us|uk|eu)/?$ test.php [NC,L] #Country RewriteRule ^/?(us|uk|eu)/(profile)/([a-zA-z0-9]+)/?$ test.php [NC,L] #Country - Profile
http://localhost/us -> Works http://localhost/us/profile/companyname -> Works http://localhost/admin -> Works too! But admin is not in the set of rules above. admin is a folder inside htdocs.