Regular Expression For Mod Rewrite
I have this..
RewriteRule ^(apes|ape)/(.*)$ $2?fh=$1 [L,QSA] I only want to match the directories ape/ and apes/ but I think it is matching any directory that ends in "ape" or "apes" or maybe does it match any string containing those characters in any order? I am not great at regex, and have read alot, but still not sure if I understand this correctly.. |
Hi,
If you want the rule to apply only for /ape/(.*) or /apes/(.*), you need a rewrite condition first so the rule will be applied to those URIs that meet the condition: Code:
RewriteCond %{REQUEST_URI} ^/(apes|ape)/(.*) |
Thanks, that explains why my sitemaps were throwing up all sorts of odd urls, if I required that rewrite condition!
|
All times are GMT -5. The time now is 09:42 AM. |