0

Banging my head against the wall on this one. Url I'm working with http://example.com/test/somewhere

RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^(.*)$ http://%{SERVER_NAME}/sample/somewhere-else [R=301,L]

Works fine, and routes all traffic out to example.com/sample/somewhere-else as to be expected

However...

RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^test/somewhere$ http://%{SERVER_NAME}/sample/somewhere-else [R=301,L]

This doesn't seem to match and does nothing. Am I writing this very basic regular expression wrong?

4

0 回答 0