I have been having problems with my website and as a result did a Crawl test in SEOmoz.
The test found a 301 Permanently Moved Redirect of all the pages on the website and it appears that they are redirected back to themselves?

After completing a crawl of my website I found that there is this huge amount of what appears to be corrupted data added to the URL for each of these pages:
https://www.getyourphotosoncanvas.com/%7Egetyouv4/%7Egetyouv4/contact-us.html
301 redirects to https://www.getyourphotosoncanvas.com/%7Egetyouv4/contact-us.html

This is then followed by an long list of redirects each adding another line, e.g.:
domain/7Egetyouv4/%7Egetyouv4/%7Egetyouv4/../%7Egetyouv4/%/contact-us.html

This repeated part, %7Egetyouv4, goes on forever… I have shortened it for the post and removed the domain name to prevent a third link (post limit).

I know this has got to be a problem. Bluehost support says that they show no 301 redirects, then that it might be a problem in the WP xmlrpc.php file? I am a novice at this can someone please tell me what all this means?

Just to clarify, I did not set the redirects, don’t need redirects, this just showed up without my knowledge. Some have suggested a hack?

More importantly, can you tell me how to fix it?

4 Answers
4

I know that this is an ancient thread but I ran across it searching for the exact solution in March 2017. I hope this solution is the trial fix that works for someone and saves a little sanity. I posted it in the X Theme support forum since I had been asking for help there, and decided that it needed wider exposure.

The bizarre (to me) solution was to rearrange the two parts of my .htaccess. Here it is for anyone who similarly bangs their heads against their desks…

I need for my .htaccess to do two things; get people browsing Domain1.com to the WP instance in the web root of the site, and redirect users browsing Domain2.com to the WP instance in a subdirectory called SubdirectoryName herein. The code sections follow. The .htaccess file causing 301 errors for every page except Home had the redirect method BEFORE the WP method. I moved the WP method above the redirect method out of desperation after deactivating plugins, searching & replacing a lot of lingering development domain URLs with Better Search Replace plug-in, and even deactivating the .htaccess altogether (didn’t know how close I came with that one), and the and the site behaved normally, with Domain2.com redirecting as desired.

Moral of the story is that WP looks like a prima donna who demands to be recognized first.

Standard WP construct:

# 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

Redirect code to send Domain2.com to the WP instance in SubdirectoryName

# BEGIN redirect to SubdirectoryName
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain2.com$
RewriteCond %{REQUEST_URI} !^/SubDirectoryName/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /SubDirectoryName/$1
RewriteCond %{HTTP_HOST} ^(www.)?domain2.com$
RewriteRule ^(/)?$ SubDirectoryName/index.php
RewriteBase /
RewriteRule ^index.(.*)?$ http://domain2.com/SubDirectoryName/ [r=301]
# END redirect to SubdirectoryName

Danged if I know what all of that redirect syntax means. We don’t have to learn every piece of code any longer and the WP ecosystem is alive and well. Glad to pay for X, support, and a few worthy plugins to reduce the incline of the learning curve. I just don’t have time – or desire – to fool with it these days. I designed my first site in Notepad, with a few buttons and a header built in Photoshop, in about 1994-5 to put my senior research paper online – just to see if I could. Then you HAD to know every dot and slash, but there were fewer of them, and it was more of a conquest thing. You could, as the book was entitled, “Learn HTML in 24 Hours”.

I hope this helps some frustrated soul get a few extra hours of sleep!

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *