In May of 2016, I implemented several redirects on a client site using .htaccess
. The client verified that all of the .htaccess
redirects were working to their satisfaction before we closed out the project.
This week, I was notified by the client that these redirects no longer work. They don't know when this began to fail and, after a few hours of research, I can't find any reason why they wouldn't continue to work.
The client does not want to use a plugin for this.
I'm including the .htaccess
file for review and suggestions.
# Disable XMLRPC
<Files "xmlrpc.php">
Order Deny,Allow
Deny from all
</Files>
# End Disable XMLRPC
# Force HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# Redirects
# Change "www" to "www" when moved to live
RedirectMatch 301 ^/watermeloncakes/ //www.clienturl.com/watermelon-cakes-1/
RedirectMatch 301 ^/watermelon-cakes/ //www.clienturl.com/watermelon-cakes-1/
RedirectMatch 301 ^/edible-arrangements-coupons/ //www.clienturl.com/fruit-arrangements-coupons/
RedirectMatch 301 ^/edible-arrangements/ //www.clienturl.com/fruit-arrangements/
RedirectMatch 301 ^/edible-arrangements-5-reasons/ //www.clienturl.com/fruit-arrangements-5-reasons/
RedirectMatch 301 ^/candy/ //www.clienturl.com/blog/christmas-candy-platters
RedirectMatch 301 ^/candy //www.clienturl.com/blog/christmas-candy-platters
RedirectMatch 301 ^/pumpkin-carving-instruction-ray-villafane/ //www.clienturl.com/blog/shop/ray-villafanes-3d-pumpkin-carving/
RedirectMatch 301 ^/4thofjulyideas/ //www.clienturl.com/4th-of-july-ideas/
RedirectMatch 301 ^/pumpkin-carving-tattoos/ //www.clienturl.com/blog/shop/pumpkin-carving-patterns-tattoos/
RedirectMatch 302 ^/transfer-pattern-paper-carving-pumpkins-watermelons/ //www.clienturl.com/blog/product-category/patterns-and-transfer-papers/
RedirectMatch 302 ^/u-and-v-fruit-carving-tools/ //www.clienturl.com/blog/shop/u-v-fruit-carving-tools/
RedirectMatch 302 ^/fruit-carving-knife-set/ //www.clienturl.com/blog/shop/kom-kom-fruit-carving-knife-set/
RedirectMatch 302 ^/thai-pro-fruit-carving-knife/ //www.clienturl.com/blog/shop/thai-pro-carving-knife/
RedirectMatch 302 ^/13-pc-fruit-carving-tools/ //www.clienturl.com/blog/shop/pro-fruit-carving-tools-13-piece/
RedirectMatch 302 ^/corrugated-u-cutters-and-melon-baller/ //www.clienturl.com/blog/shop/corrugated-u-cutters/
RedirectMatch 301 ^/shop/ //www.clienturl.com/blog/shop/
RedirectMatch 301 ^/pp-resources/ //www.clienturl.com/blog/pumpkin-portraits-resources-members/
RedirectMatch 301 ^/dvd-lessons-and-tool-sets/ //www.clienturl.com/blog/shop/
RedirectMatch 301 ^/message-sent-success/ //www.clienturl.com/blog/your-message-successfully-sent/
RedirectMatch 301 ^/which-lessons-tools-for-you/ //www.clienturl.com/blog/best-lessons-for-you/
RedirectMatch 301 ^/fabric //www.clienturl.com/blog/shop/pattern-transfer-fabric/
RedirectMatch 301 ^/101 //www.clienturl.com/vegetable-and-fruit-carving-course-101
RedirectMatch 301 ^/weave //www.clienturl.com/blog/shop/melon-basket-weave/
RedirectMatch 301 ^/twirl //www.clienturl.com/blog/shop/twisty-twirl-tool/
RedirectMatch 301 ^/vegcurl //www.clienturl.com/blog/shop/vegetable-curler/
RedirectMatch 301 ^/wavy //www.clienturl.com/blog/shop/wavy-peeler/
#IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
#<Limit GET POST>
#The next line modified by DenyIP
#order allow,deny
#The next line modified by DenyIP
#deny from all
#allow from all
#</Limit>
#<Limit PUT DELETE>
#order deny,allow
#deny from all
#</Limit>
#AuthName vegetablefruitcarving.com
# stop hotlinking and serve alternate content
# <IfModule mod_rewrite.c>
# RewriteEngine on
# RewriteCond %{HTTP_REFERER} !^$
# RewriteCond %{HTTP_REFERER} !^http://(www\.)?vegetablefruitcarving\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^https://(www\.)?vegetablefruitcarving\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^http://(www\.)?sbox\.vegetablefruitcarving\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^http://(www\.)?twitter\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^https://(www\.)?twitter\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^http://(www\.)?facebook\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^https://(www\.)?facebook\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^http://(www\.)?pinterest\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^https://(www\.)?pinterest\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^http://(www\.)?youtube\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^https://(www\.)?youtube\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^http://(www\.)?flickr\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^https://(www\.)?flickr\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^http://(www\.)?plus.google\.com/.*$ [NC]
# RewriteCond %{HTTP_REFERER} !^https://(www\.)?plus.google\.com/.*$ [NC]
# RewriteRule .*\.(gif|jpg|png|pdf)$ //altlab.com/hotlinking.html [R,NC,L]
# </ifModule>
<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 79.29.221.71
# BEGIN WPSuperCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{HTTPS} on
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz -f
RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz" [L]
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{HTTPS} !on
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz -f
RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz" [L]
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTPS} on
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html -f
RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html" [L]
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
RewriteCond %{HTTPS} !on
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html -f
RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html" [L]
</IfModule>
# END WPSuperCache
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress