Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Senior Member bamme's Avatar
    Join Date
    Aug 2009
    Posts
    319
    Member #
    19662
    Liked
    1 times
    Hi all

    I have not done a redirect using htacces/301 before. So i just wanted to check with people here before i implement this, as the htaccess file already has some stuff in it. So, could anyone tell me quickly, is this right? (The bit i have added is for individual page redirects, and starts after "# END WordPress")

    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.mysitename\.co.uk$
    RewriteRule (.*) http://www.mysitename.co.uk/$1 [R=301,L]
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    Redirect 301 /uk-female-rock-exclusive-mp3s-contact.html http://www.mysitename.co.uk/
    
    Redirect 301 /uk-female-rock-exclusive-mp3s-music.html http://www.thebestmusicshop.co.uk/mp3-download/1/mysitename/intc.html
    
    Redirect 301 /uk-female-rock-exclusive-mp3s-shop.html http://www.thebestmusicshop.co.uk/mp3-download/1/mysitename/intc.html
    
    Redirect 301 /uk-female-rock-exclusive-mp3s-thankyou.html http://www.mysitename.co.uk/
    
    Redirect 301 /uk-female-rock-exclusive-mp3s-video.html http://www.mysitename.co.uk/the-indie-rock-bands-home/music-videos/
    
    Redirect 301 /absolutely-free-music-downloads.html http://www.mysitename.co.uk/best-rock-music-free-downloads/
    
    Redirect 301 /uk-female-rock-exclusive-mp3s-biography.html http://www.mysitename.co.uk/the-indie-rock-bands-home/female-rock-singers-bio/
    
    Redirect 301 /uk-female-rock-exclusive-mp3s-contact.html http://www.mysitename.co.uk/

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    I've never seen that before....

    The way I've always seen it is:

    Code:
    RewriteRule /uk-female-rock-exclusive-mp3s-contact.html http://www.mysitename.co.uk/ [L,R=301]

  4. #3
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    By the way, you should do as much as possible to get the old URL pointing to the new URL for the same resource (if it still exists). Otherwise, you'll get penalized by Google.

  5. #4
    Senior Member bamme's Avatar
    Join Date
    Aug 2009
    Posts
    319
    Member #
    19662
    Liked
    1 times
    Hm okay thankyou Steve .. i found that way of writing it in my example here:

    http://www.ndesign-studio.com/blog/3...ccess-redirect
    and here
    http://www.tamingthebeast.net/articl...1-redirect.htm

    Is this not the right way to write it?

    By the way, you should do as much as possible to get the old URL pointing to the new URL for the same resource (if it still exists). Otherwise, you'll get penalized by Google.
    Okay - totally understand, is there another way to do this then alongside 301 redirect? Each page in my 301 redirect will redirect to its corresponding new page, eg - this is the old music page, redirecting to the new music page:
    Redirect 301 /uk-female-rock-exclusive-mp3s-music.html http://www.thebestmusicshop.co.uk/mp...name/intc.html
    Is there more i can do?

  6. #5
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    No, that's exactly how you should do it.. Regarding "Redirect 301" - I'm not saying it's wrong, just saying I've never seen it before. There's usually more than one way to do things in coding. ;-)

  7. #6
    Senior Member bamme's Avatar
    Join Date
    Aug 2009
    Posts
    319
    Member #
    19662
    Liked
    1 times
    oh cool thanks *gives some rep before she's spread it around again*

  8. #7
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Redirect 301 is probably faster if you're redirecting one specific page to another, because RewriteRules generally invoke the overhead of a regex engine, instead of the more basic Redirect command. But the regex overhead for something that isn't really a regex isn't going to be big, so whatever.

    EDIT: When I say `faster', of course, I mean in relative terms. They're both blazing fast.

  9. #8
    Senior Member bamme's Avatar
    Join Date
    Aug 2009
    Posts
    319
    Member #
    19662
    Liked
    1 times
    Thanks for the insight Shadowfiend, always good to know the reason behind these things


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

4 redirection status music downloads

Click on a term to search for related topics.
All times are GMT -6. The time now is 12:26 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com