Testing for a 'complete' string.
Posted: Tue Feb 13, 2007 6:24 pm
I am doing a mod_rewrite and need to create a pattern that excludes certain strings from the URL, however, I am unsure how to write the pattern so that it only disallows the entire string, not letters within:
Example:
- I need to exclude the words member and user from the URL in a specific spot.
* Please ignore the "anything goes" patterns above, as they are simply put there for simpleness sake.
The Rule I have created above does not work because it does not only exclude the entire "member" and "user" words, but it also excludes anything that includes one of the letters listed above.
How can I get this first part of the pattern to only exclude the words member and user in whole? Not parts of. Thanks for your help and guidance on this.
Example:
- I need to exclude the words member and user from the URL in a specific spot.
Code: Select all
RewriteRule ^([^member|user]+)/([^/\.]+)-([^/\.]+)/?$ page.php?r=$3 [L]The Rule I have created above does not work because it does not only exclude the entire "member" and "user" words, but it also excludes anything that includes one of the letters listed above.
How can I get this first part of the pattern to only exclude the words member and user in whole? Not parts of. Thanks for your help and guidance on this.