Question on 301 redirects after a site redesign

10 replies
  • WEB DESIGN
  • |
Hello, fello Warriors,

I just got to redesign an old website (from a custom coded platform to Wordpress). The old and new URLs now look like these:

Old url: www.somedomain.com/en/file-path
New url: www.somedomain.com/file-path/

This structure is repeated site-wide.

Is there a single instruction I can add in the .htaccess file (or some other way, maybe using a plugin) that takes care of all the 301 redirects using the above rule?

I don't want to have to manually write redirects for 100s of URLs. Am sure there is a simpler way.

Thanks!
#301 #question #redesign #redirects #site
Avatar of Unregistered
  • Profile picture of the author empirecapitol
    Code:
    RewriteEngine On
    RewriteCond %{REQUEST_URI}/ en
    RewriteRule ^(.*) http://www.somewhere.com/%{REQUEST_URI} [R=302,NC]
    RewriteRule ^(.*) http://www.somewhere.com/en/%{REQUEST_URI} [R=302,NC]
    Try This.
    Signature
    Grow Your Business Online With Mike Klingler and Mike's Books on thriftbooks.com
    {{ DiscussionBoard.errors[11530502].message }}
    • Profile picture of the author Brrainstormerr
      Thanks buddy, just a quick question. These redirects have to be permanent redirects. So do we use [R=302,NC] or [R=301,NC] instead?
      {{ DiscussionBoard.errors[11530661].message }}
      • Profile picture of the author Gohar Ilyas
        301 redirect means that the page has permanently moved . And 302 redirect means that the move is only temporary. So you need to choose a 301.
        {{ DiscussionBoard.errors[11532447].message }}
  • Profile picture of the author empirecapitol
    301 redirect
    Signature
    Grow Your Business Online With Mike Klingler and Mike's Books on thriftbooks.com
    {{ DiscussionBoard.errors[11530773].message }}
  • Profile picture of the author leesajohnson
    If you want to permanently move URL'S then you must apply 301.
    {{ DiscussionBoard.errors[11531497].message }}
  • Profile picture of the author Martin smith
    If you want to permanent redirect URL's then you must use 301 redirection method or for temporary purpose use 302 redirection method ...
    {{ DiscussionBoard.errors[11531763].message }}
  • Profile picture of the author Martin smith
    If you want permanent URL redirection you should apply 301 or else use 302 redirection method for temporary move...
    {{ DiscussionBoard.errors[11532971].message }}
  • Profile picture of the author jimmy adam
    301 redirects help protect your website during an upgrade, redesign, or move. While they are really easy to implement, many website owners and developers forget about them and in the process, this derails SEO efforts and can completely wipe away ranking in search.

    .htaccess File
    To implement a 301 redirect for websites that are hosted on servers running Apache, you'll need access to your server's .htaccess file.

    1. #Begin 301 Redirects
    2. Redirect 301 /old-page/ "Example New Page Url" https://www.viftech.com/sharepoint-development/
    3. # End 301 Redirects

    Redirection Plugin for WordPress

    f you are using WordPress, you can also use a plugin like Redirection to set up 301 redirects right from within your dashboard.
    {{ DiscussionBoard.errors[11537367].message }}
  • Profile picture of the author Ron Peters
    You do not have to manually redirect every link using .htaccess. You can use a simple 301 redirect plugin to take care of all 404 errors automatically.
    {{ DiscussionBoard.errors[11537839].message }}
  • Profile picture of the author wickieagentur
    Use a redirection plugin and apply 301 redirects on the links you want.
    {{ DiscussionBoard.errors[11551409].message }}
Avatar of Unregistered

Trending Topics