BulletProof Security
[resolved] 301 Redirect Not Working (7 posts)

  1. balfred
    Posted 3 years ago #

    My site redirects from http://www.piepho.com to http://piepho.com as shown in this Fetch as Google document:
    HTTP/1.1 301 Moved Permanently
    Date: Fri, 03 May 2013 15:07:55 GMT
    Server: Apache
    X-Pingback: http://piepho.com/xmlrpc.php
    Location: http://piepho.com/
    Content-Length: 0
    Keep-Alive: timeout=3, max=100
    Connection: Keep-Alive
    Content-Type: text/html; charset=UTF-8

    I did not make this above re-direct, and don't know where it lives. It is not in the root .htaccess file, as this .htaccess is generated by BPS. Even though I've got the BPS generated .htacess file in both my http://piepho.com and http://www.piepho.com root folders, it seems that there is a redirect somewhere else overriding it, since pages get redirected (as shown in Fetch as Google) but don't follow the rewrite rule that I'm using in BPS. Can you tell me how to make BPS the default rule?

    The rewrite rule I am using (as entered in Root .htaccess Custom Code input area in BPS):
    Options +FollowSymlinks
    RewriteEngine on
    rewriterule http://www.piepho.com/locations/mankato-mn-mover(.*)$ http://piepho.com/about/contact/$1 [r=301,nc]



  2. AITpro
    Plugin Author

    Posted 3 years ago #

    hmm what does this mean - "...Even though I've got the BPS generated .htacess file in both my http: //piepho.com and http: //www.piepho.com root folders". Do you have the same website duplicated in 2 different folders? If so, why would you be doing something like that?

    Check your WordPress Settings to make sure they are correct.
    Settings >>> General
    WordPress Address (URL)
    Site Address (URL)

    To create redirect rules use RedirectMatch instead. And I do not think you really want the back reference $1, but i could be wrong. Are you trying to redirect /locations/mankato-mn-mover(.*) to just your contact page or do you want this instead /about/contact/locations/mankato-mn-mover.

    RedirectMatch 301 ^/locations/mankato-mn-mover(.*)$ http://piepho.com/about/contact/
  3. balfred
    Posted 3 years ago #

    Thanks for the fast response, and helpful answer. It turns out that the Redirect Match in your code did the job!

    I checked the settings as above, and they are both correct: http://piepho.com

    My webhost automatically sets up the two folders -- one for the http://www.piepho.com and one for .piepho.com. I do not have a Redirect setup from within my webhost, so that is why I'm confused as to where the redirect from the www to the non-www site is originating. Any thoughts on that one?

    Thanks for your help!


  4. AITpro
    Plugin Author

    Posted 3 years ago #

    Yeah that is really wierd to have two folders like that. This is the first anyone has ever mentioned something like this to me and I have no idea why they would do that. Give them a ring and ask them about that.

    My guess is that the www to non-www redirect has to do with the two folder setup. This is something that you will have to ask your Host about too since I don't have any logical guesses that I can offer about this. ;)

  5. AITpro
    Plugin Author

    Posted 3 years ago #

    Oh you mentioned that you had .htaccess files for each folder so double check them. Also I guess you could always do a redirect from the other folder to the site you want if that is what is going on.

  6. AITpro
    Plugin Author

    Posted 3 years ago #

    Host issue/non-BPS issue. Resolving.

  7. balfred
    Posted 3 years ago #

    Thanks again for your help. You were right... I asked the host and they put the re-direct in automatically given their two folder setup.
    I really appreciate it. I'm heading over to wordpress.org right now to give BPS a 5-star rating given your excellent support.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic