Support » Plugin: BulletProof Security » Where to add 301 Redirects?

Viewing 15 replies - 16 through 30 (of 51 total)
  • Plugin Author AITpro

    (@aitpro)

    Or this would work… OOPs i was leaving the “t” off of RedirectMatch. Fat fingered it. 😉

    RedirectMatch 301 ^/(.*)\.science\.php$ http://www.immunocal.md/science/

    Hmmmm… now I have a 500 internal server error and everything is off?

    Plugin Author AITpro

    (@aitpro)

    yep typo. Add the “t” to RedirectMatch. I corrected my previous posts and added the “t”.

    I can’t do anything… Can’t even Restore Backup? Everything is giving me a 500 error.

    Plugin Author AITpro

    (@aitpro)

    download the .htaccess file in your website root folder and delete it from your website, log back in and create a new htaccess file by activating Root BulletProof Mode again.

    Plugin Author AITpro

    (@aitpro)

    If you need to add any .htaccess code from your old .htaccess file then copy and paste it from the .htaccess file you downloaded. Do not copy and paste the typo back into your new htaccess file…

    ok, site is back online… working on a couple things here.

    I tried a different redirect (without immunocal in the extension) and I am getting the same thing:

    Redirect 301 /glutathione.php http://www.immunocal.md/glutathione/
    Redirect 301 /glutathione.html http://www.immunocal.md/glutathione/

    I will test your other suggestion now.

    ok, this did not work either:

    RedirectMatch 301 ^/(.*)\.science\.php$ http://www.immunocal.md/science/

    Is it possible that there is a setting somewhere that is causing all redirects to go to the main URL?

    Plugin Author AITpro

    (@aitpro)

    Use RedirectMatch NOT redirect. RedirectMatch allows you to use Regex and redirect does NOT.

    RedirectMatch 301 ^/glutathione\.php$ http://www.immunocal.md/glutathione/
    RedirectMatch 301 ^/glutathione\.html$ http://www.immunocal.md/glutathione/
    Plugin Author AITpro

    (@aitpro)

    Yep something is fubar. Judging by the file naming convention that was used I can only imagine what else is fubar. LOL

    Plugin Author AITpro

    (@aitpro)

    LOL your have redirects on redirects or in other words you are looping. When i go to the /science URL it sends me back to the Home page. You have a loop/mistake somewhere.

    Yes, this is what I am trying to figure out…

    Plugin Author AITpro

    (@aitpro)

    Can’t help you there. You need to download your .htaccess files as backups and start all over again. Or track down where the redirect from the /science folder is that is redirecting to your home page. it could be in your .htaccess file for that site or it could be in your control panel. This is where i get off the bus. 😉

    Thanks very much for your help, we are getting somewhere now… I think the old redirect is from the old host. There must be something there on their server still because I moved this entire site to a new host, but left a couple others.

    Thanks again!

    Hello again, I am posting here to reference what we did the other day.

    To update:

    The redirects were not working because the URL’s had www included. Once I removed www from all the destination URL’s, the redirects worked fine. So, that issue is resolved.

    However, I am now trying to redirect the www version to the non-www version of the site. I have read over the various posts you have regarding this and have tried to get this working, without success.

    My problem seems to be that I am not putting the code in the right place for it to work on all of the .htaccess files produced by BPS?

    As it stands, the wordpress install (multisite) is loaded without the www. So, if I go to http://www.immunocal.md it automatically redirects to immunocal.md (with or without any redirect code).

    However, if I go to a post page, ie. http://www.immunocal.md/gmo_food_in_baby_formula/ it redirects back to the homepage (http://immunocal.md, rather than http://immunocal.md/gmo_food_in_baby_formula/

    So, where am I supposed to be loading the code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www\.immunocal\.md$ [NC]
    RewriteRule ^(.*)$ http://immunocal.md/$1 [R=301,L]
    RewriteBase /
    RewriteRule ^index\.php$ – [L]

    Thank you!

Viewing 15 replies - 16 through 30 (of 51 total)
  • The topic ‘Where to add 301 Redirects?’ is closed to new replies.