WordPress.org

Ready to get started?Download WordPress

Forums

htaccess redirects not working (12 posts)

  1. meshmarketer
    Member
    Posted 3 years ago #

    My redirects are not working at all. Anyone know why?

    [post large chunks of code at pastebin.com - thanks]

  2. webjunk
    Member
    Posted 3 years ago #

    We would need to know what kind of redirects you are talking about. If this in htaccess then we need to see your htaccess. If in WP then we need further details , a link to your website & your configuration. Otherwise would just be guessing.

  3. meshmarketer
    Member
    Posted 3 years ago #

    Yes, I had put it there.

    It is in WP and I didn't use pastebin till now:

    PASTEBIN

  4. webjunk
    Member
    Posted 3 years ago #

    Need a valid Pastebin link.

  5. meshmarketer
    Member
    Posted 3 years ago #

    sorry, it was set to private. try again.

  6. webjunk
    Member
    Posted 3 years ago #

    The link is not valid.

  7. meshmarketer
    Member
    Posted 3 years ago #

  8. webjunk
    Member
    Posted 3 years ago #

    As one example from your .htaccess:

    Redirect 301 http://pelvicpainhelp.com/physical_therapy.php http://pelvicpainhelp.com/treatment/physical-therapy-wise-anderson-protocol/

    should be (notice file path instead of web path):
    Redirect 301 /physical_therapy.php http://pelvicpainhelp.com/treatment/physical-therapy-wise-anderson-protocol/

    Also generaly you should not mix "Redirect" with "RewriteRule" in the same .htaccesss. And do you need the redirects in the ifmodule statement? Would put them above so they always run.

    Then go to my tools page:
    http://webjunk.com/tools/
    Use the URL Redirect Checker to see if its working.

  9. meshmarketer
    Member
    Posted 3 years ago #

    I did change the path to test it out and it didn't work. There is something else going on there.

    I don't know if I need them there as I think there were put there by my plugins.

  10. webjunk
    Member
    Posted 3 years ago #

    Put this at the top of your .htaccess and then try my URL Checker.

    RewriteEngine On
    Options +FollowSymLinks

    Redirect 301 /physical_therapy.php http://pelvicpainhelp.com/treatment/physical-therapy-wise-anderson-protocol/

    Make sure in the redirect line that only a single space (no more) can exist between words!

  11. meshmarketer
    Member
    Posted 3 years ago #

    That worked!

  12. webjunk
    Member
    Posted 3 years ago #

    Then you need to fix the rest of your .htaccess in a similar fashion. Then chec not only those redirects but everything else in your .htaccess to make sure they work properly
    Have a nice day!

Topic Closed

This topic has been closed to new replies.

About this Topic