Skip to content

Instantly share code, notes, and snippets.

@samholguin
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samholguin/3555fc85fd00bc6f4a96 to your computer and use it in GitHub Desktop.
Save samholguin/3555fc85fd00bc6f4a96 to your computer and use it in GitHub Desktop.
.htaccess Rules
Negative lookahead based rule:
RewriteRule ^products/(?!certain-category).*$ http://shop.newurl.co.uk/ [NC,L,R=301]
(?!certain-category) is a negative lookahead that will fail the match if certain-category comes right after /products/ in URL.
RedirectMatch 301 /products(.*) http://shop.sunwise.co.uk/
Redirect 301 /shop http://shop.sunwise.co.uk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment