Forums

Problems with 301 redirect and permalinks (10 posts)

  1. darbronnoco
    Member
    Posted 3 months ago #

    Hey everyone. I am currently having a heck of a time getting redirects to work. I recently replaced my html site with my wordpress blog. Everything is working as expected, but now I am trying to forward all the old sites messy links to the nicely formatted wordpress links. If I turn off the custom permalinks my redirect seems to work just fine.

    one example is http://www.bradoconnorphotography.com/Weddings/wpackages/wpackages.html forwarded to bradoconnorphotography.com/?page_id=2 (which is also http://www.bradoconnorphotography.com/wedding-packages/)

    If someone can point me in the right direction that would be awesome.

  2. SwansonPhotos
    Member
    Posted 3 months ago #

    try not including the 'www.' in the addresses for the new site.

  3. SwansonPhotos
    Member
    Posted 3 months ago #

    And check your custom permalink strucure. edit: there is a ) at the end of the link above :-)

  4. darbronnoco
    Member
    Posted 3 months ago #

    I removed the www and it still doesn't seem to work.

  5. darbronnoco
    Member
    Posted 3 months ago #

    wordpress is still installed in a folder and not the rood of the domain. I copied the htaccess file and index.php per the instructions.

  6. darbronnoco
    Member
    Posted 3 months ago #

    The ) was just in the post... the actual url is http://www.bradoconnorphotography.com/wedding-packages/

    This is just one example. Once I figure out how to get one working I will be set.

  7. SwansonPhotos
    Member
    Posted 3 months ago #

    Please use the code button above to share an example of the exact code/syntax you are using in the old site to redirect.

  8. darbronnoco
    Member
    Posted 3 months ago #

    Well, I have been trying to use the go daddy 301 redirect setup in their hosting manager.

    for example I am trying to redirect http://www.bradoconnorphotography.com/Weddings/wpackages/wpackages.html
    to
    http://www.bradoconnorphotography.com/?page_id=2 (this is the non permalink address)

    This is the htaccess in the root of my photography domain

    # 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

    This is inside of the blog folder which is inside of the root of the photography domain

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    
    # END WordPress

    And this is the root of all my hosting

    rewriteengine on
    rewritecond %{HTTP_HOST} ^www.bradoconnorphotography.com$ [OR]
    rewritecond %{HTTP_HOST} ^bradoconnorphotography.com$
    rewriterule ^BOPhoto\/Weddings\/wpackages\/wpackages\.html "http\:\/\/bradoconnorphotography\.com\/?page_id=2" [R=301,L] #4f35d11caa89b
    rewritecond %{HTTP_HOST} ^photobooth-wisconsin.com$
    rewriterule ^Photobooth-Wisconsin\/ "http\:\/\/www\.photobooth-wisconsin\.com" [R=301,L] #4c2b5770804ae
  9. SwansonPhotos
    Member
    Posted 3 months ago #

    the .htaccess redirect rules should be in the root for each site, also what is the #number for?

    Does he need to encode the question mark? Why not redirect to the permalink, should work...

  10. darbronnoco
    Member
    Posted 3 months ago #

    I'm not sure what the numbers are for the might be added from the hosting panel?

    My permalink structure is like this /%category%/%postname%/ but for the most part I am linking to pages and not posts. So do I need to make sure i have the same redirects in each of the htaccess files? and if so how would I format it for the example above?

    Thanks,

Reply

You must log in to post.

About this Topic

Tags

No tags yet.