Skip to content

Instantly share code, notes, and snippets.

@variousred
Last active August 29, 2015 14:16
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 variousred/052ba74d4bdd2067bd89 to your computer and use it in GitHub Desktop.
Save variousred/052ba74d4bdd2067bd89 to your computer and use it in GitHub Desktop.
DirectoryIndex index.html
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^self-storage/?$ /self-storage/ga/atlanta/space-shop-self-storage-decatur [R=301,L]
RewriteRule ^self-storage/ga/?$ /self-storage/ga/atlanta/space-shop-self-storage-decatur [R=301,L]
RewriteRule ^self-storage/ga/atlanta/?$ /self-storage/ga/atlanta/space-shop-self-storage-decatur [R=301,L]
RewriteRule ^self-storage/?$ /self-storage/ga/loganville/space-shop-self-storage-loganville [R=301,L]
RewriteRule ^self-storage/ga/?$ /self-storage/ga/loganville/space-shop-self-storage-loganville [R=301,L]
RewriteRule ^self-storage/ga/loganville/?$ /self-storage/ga/loganville/space-shop-self-storage-loganville [R=301,L]
RewriteRule ^self-storage/?$ /self-storage/ga/buford/space-shop-hamilton-mill [R=301,L]
RewriteRule ^self-storage/ga/?$ self-storage/ga/buford/space-shop-hamilton-mill [R=301,L]
RewriteRule ^/self-storage/ga/buford/?$ self-storage/ga/buford/space-shop-hamilton-mill [R=301,L]
RewriteRule ^self-storage/?$ /self-storage/ga/marietta/space-shop-self-storage-johnsons-ferry [R=301,L]
RewriteRule ^self-storage/ga/?$ /self-storage/ga/marietta/space-shop-self-storage-johnsons-ferry [R=301,L]
RewriteRule ^self-storage/ga/marietta/?$ /self-storage/ga/marietta/space-shop-self-storage-johnsons-ferry [R=301,L]
RewriteRule ^self-storage/?$ /self-storage/ga/stockbridge/space-shop-self-storage-hudson-bridge [R=301,L]
RewriteRule ^self-storage/ga/?$ /self-storage/ga/stockbridge/space-shop-self-storage-hudson-bridge [R=301,L]
RewriteRule ^self-storage/ga/stockbridge/?$ /self-storage/ga/stockbridge/space-shop-self-storage-hudson-bridge [R=301,L]
RewriteRule ^self-storage/?$ /self-storage/ga/atlanta/space-shop-self-storage [R=301,L]
RewriteRule ^self-storage/ga/?$ /self-storage/ga/atlanta/space-shop-self-storage [R=301,L]
RewriteRule ^self-storage/ga/atlanta/?$ /self-storage/ga/atlanta/space-shop-self-storage [R=301,L]
RewriteRule ^Self-Storage-Atlanta-GA.php /self-storage/ga/atlanta/space-shop-self-storage-decatur [R=301,L]
RewriteRule ^Self-Storage-Loganville-GA.php /self-storage/ga/loganville/space-shop-self-storage-loganville [R=301,L]
RewriteRule ^Self-Storage-Buford-GA.php /self-storage/ga/buford/space-shop-hamilton-mill [R=301,L]
RewriteRule ^Self-Storage-Marietta-GA.php /self-storage/ga/marietta/space-shop-/self-storage-johnsons-ferry [R=301,L]
RewriteRule ^Self-Storage-Stockbridge-GA.php /self-storage/ga/stockbridge/space-shop-self-storage-hudson-bridge [R=301,L]
RewriteRule ^testimonials.php /testimonials/ [R=301,L]
RewriteRule ^storage-estimator.php /storage-help/ [R=301,L]
RewriteRule ^storage-tips.php /storage-tips/ [R=301,L]
RewriteRule ^storage-faq.php /storage-faq/ [R=301,L]
RewriteRule ^moving-supplies.php /moving-supplies/ [R=301,L]
RewriteRule ^size-guide.php /what-size-unit/ [R=301,L]
RewriteRule ^contact-us.php /contact-us/ [R=301,L]
RewriteRule ^404.php /self-storage/ga/atlanta/space-shop-self-storage [R=301,L]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^locations/$ /locations/?search=blank [R=301,NE,NC,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
</IfModule>
SetEnvIfNoCase Referer semalt.com spammer=yes
Order allow,deny
Allow from all
Deny from env=spammer
@variousred
Copy link
Author

git clone git@heroku.com:g5-clw-6j5d8ev-space-shop-self.git
cd g5-clw-6j5d8ev-space-shop-self
edit .htaccess
lines 37 and 38 need to be entered just above whats in lines 37 and 38
(you want the two lines with RewriteCond QUERY_STRING and RewriteRule with locations/ which i've outdented)
git commit -am 'updates htaccess file'
git push origin master

only add the two lines, the rest is generated and you wont need to touch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment