Skip to content

Instantly share code, notes, and snippets.

@malinky
Created February 3, 2015 10:08
Show Gist options
  • Save malinky/8673c085e5b772e0da4a to your computer and use it in GitHub Desktop.
Save malinky/8673c085e5b772e0da4a to your computer and use it in GitHub Desktop.
.htaccess
RewriteEngine On
# Redirect a specific page. Includes optional trailing slash.
# Both rules go to the same page on the same domain.
# If not using the protocol on the redirect remember the opening slash.
# RewriteRule ^djs/meatkatie(/)?$ http://www.domain.co.uk/dj-listings/meatkatie [R=301,L]
# RewriteRule ^djs/meatkatie(/)?$ /dj-listings/meatkatie [R=301,L]
# Redirect whole directory. Includes optional trailing slash.
# RewriteRule ^djs(/)?(.*)$ http://www.domain.co.uk/dj-listings [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment