I’m no expert in mod_rewrite at all and I’m trying to add a condition to the rule below to:
- match which is not equal to ‘share’
- not match anything with a dot in it
RewriteRule ^([^/]*)$ http://domain.com/directory/index.php?key=$1 [L]
http://domain.com/directory/share will not be matched (share)
http://domain.com/directory/foo.php will not be matched (contains a dot)
http://domain.com/directory/abcde will be matched
http://domain.com/directory/abcde-4 will be matched
All ULRs will not have a trailing slash
Any help will be much appreciated
Don’t match anything with a dot by adding
.to the negated character class:Don’t match an ending
/share:Combine them to not-match either using a negative lookahead: