.htaccess help – 301 redirects not working
-
Hey everyone –
I’m going to move my site from one domain to another. It’s a strategic rebrand. So this is a done deal and a smart move.
However, my 301 redirects, when I do them from inside my .htaccess file at BlueHost, don’t work. They 404 instead.
Just visit this URL to see: http://www.freelancewriterinchicago.com/test-url/ (should redirect to my portfolio)
For now, I use a plugin,”Eggplant 301 Redirects,” to redirect URLs from WordPress. I prefer to have this done through my .htaccess file.
I suspect code in there prevents 301s from working. However, I’m not a programming wiz, so I could be wrong on that.
Here’s my .htaccess code…curious on your thoughts on this:
# 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 # deflector.map text file that redirects unwanted referral traffic back to the source RewriteMap deflector txt:/public_html/freelancewriterinchicago/deflector.map RewriteCond %{HTTP_REFERER} !="" RewriteCond ${deflector:%{HTTP_REFERER}} =- RewriteRule ^ %{HTTP_REFERER} [R,L] # End deflector map # Begin blocking irritating IPs from Google Analytics - doesn't seem to work RewriteEngine on RewriteCond %{HTTP_REFERER} ^http://(www\.)?4webmasters\.org [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?trafficmonetize\.org [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?100dollars-seo\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?free-share-buttons\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?site3.free-share-buttons\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?site4.free-share-buttons\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?site6.free-share-buttons\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?best-seo-offer\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?free-social-buttons\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?event-tracking\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?buttons-for-your-website\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?guardlink\.org [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?get-free-traffic-now\.com [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?buy-cheap-online\.info [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?badreferrers\.com [NC] RewriteRule (.*) - [F] # end annoying IPs # begin 301 redirects for blog/website Redirect 301 /seo-copywriting-services/professional-small-business-blogger-service/ http://www.freelancewriterinchicago.com/professional-small-business-blogger-ghostwriter-service/ Redirect 301 /seo-copywriting-services/professional-ghostwriting-service/ http://www.freelancewriterinchicago.com/business-copywriting-services/professional-ghostwriting-service/ Redirect 301 /why-and-how-to-become-a-thought-leader-through-blogging/ http://www.freelancewriterinchicago.com/how-to-become-a-thought-leader-by-blogging/ Redirect 301 /am-i-a-good-fit-for-you/ http://www.freelancewriterinchicago.com/are-my-b2b-copywriting-services-a-good-fit-for-you/ Redirect 301 /about-freelance-copywriter-in-chicago/ http://www.freelancewriterinchicago.com/about-B2B-copywriter-Dan-Stelter/ Redirect 301 /website-copywriting-service-portfolio/ http://www.freelancewriterinchicago.com/b2b-copywriting-portfolio/ Redirect 301 /test-url/ http://www.freelancewriterinchicago.com/b2b-copywriting-portfolio/ # Set PHP handler to application/x-httpd-phpbeta on Mon Jan 11 22:51:53 MST 2016. AddHandler application/x-httpd-phpbeta .php
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘.htaccess help – 301 redirects not working’ is closed to new replies.