• I am trying to redirect pages on the same domain.
    https://www.abc.com/old-page.html to https://www.abc.com/new-page/

    I feel like I have tried everything and have looked through every website looking for help.

    Currently I have this:
    Redirect 301 “/data/uploads/pdfs/menu_drinks.pdf “/wp-content/uploads/2016/05/drinks-menu.pdf”
    Redirect 301 “/online-ordering/” “/takeout-delivery/”

    # 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

    I have also tried things like…
    RewriteCond %{HTTP_HOST} ^abc.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.abc.com$
    RewriteRule ^online-ordering\/ “http:\/\/www.abc.com\/takeout-delivery\/” [R=301,L]

    and…
    Redirect 301 https://www.abc.com/online-ordering/ https://www.abc.com/takeout-delivery/

    as well as a bunch more…

    I’ve also tried changing file permissions to 644 each time.

    I would really appreciate your help as this has been exhausting.

    • This topic was modified 8 years, 7 months ago by rmeghdies.
    • This topic was modified 8 years, 7 months ago by rmeghdies.
Viewing 3 replies - 1 through 3 (of 3 total)
  • I don’t know about using those quotes in your redirect. I would simply do it like this:

    Redirect 301 /data/uploads/pdfs/menu_drinks.pdf /wp-content/uploads/2016/05/drinks-menu.pdf
    Redirect 301 /online-ordering/ /takeout-delivery/

    Also, make sure your server host is set to allow this.

    BTW, did you mean to switch “menu-drinks” to “drinks-menu”?

    • This reply was modified 8 years, 7 months ago by timothydungan.
    Thread Starter rmeghdies

    (@rmeghdies)

    I had tried that, nothing.

    What do I need to check for on the hosting side?

    Thanks.

    Ignore that I mentioned the server settings before, because if they were set up wrong, WordPress wouldn’t work. Anyway, try this in your HTACCESS file above the “# BEGIN WordPress” section:

    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^online-ordering/(.*)$ /takeout-delivery/$1 [R=301,L]
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘.htaccess – Simple 301 Redirect – Nothing Works’ is closed to new replies.