Reputation: 417
I need to do a rewrite on all requests on a domain. For now, I have this AliasMatch rule set :
AliasMatch (.*) "/home/x/public_html/index.php"
Although, for security measures, I need to allow only alphanumerical (+ the slashes in the requests, along with GET variables). Some directories do not need rewriting, in this case, all directories starting with "_". I've been trying to write such a Regex, but I can't seem to get it to work.
Upvotes: 0
Views: 265
Reputation: 1375
For alphanumeric only matching, you'd want:
AliasMatch ^/[a-zA-Z0-9]+$ /home/x/public_html/index.php
Upvotes: 2