I have a URl I'm trying to rewrite. The URL looks like this:
I want to simply take everything after photo-gallery/ and pass it to a php script. However rewrite does not seem to like the hyphen.
Here's some things i've tried:
None of which work. However as soon as I change the url to photo_gallery (ie replace the hyphen with an underscore) and adjust the rules accordingly it works fine.
RewriteRule ^photo-gallery/(.*)$ photo-gallery.php?req=$1 [L]
RewriteRule ^photo\-gallery/(.*)$ photo-gallery.php?req=$1 [L]
RewriteRule ^photo.gallery/(.*)$ photo-gallery.php?req=$1 [L]
I've done some testing and this issue is only apparent when running apache under OSX. On linux and windows boxes the exact same file produces the desired effect. Does anyone have any idea why this may not be working on my mac?