Great community. Great ideas.

Welcome to SEOChat, a community dedicated to helping beginners and professionals alike in improving their Search Engine Optimization knowledge.  Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: SEO Friendly URL Redirect

Results 1 to 14 of 14
Share This Thread →
  1. #1
    seokid123 is offline Registered User SEO Chat Explorer (0 - 99 posts)
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0

    Question SEO Friendly URL Redirect

    Hi guys,

    I have a question if anyone can help me.

    So we have purchased a dropped domain with a PageRank of 4 and we want to retain the sites PageRank but we plan on installing WordPress then adding relevant content and links to another site.

    To make sure that the PageRank is kept I need to write a 301 redirect that will redirect any url (whether it exists of not) back to the home page of that site.

    For example:
    example.com/pages/page.htm ---> example.com
    sub.example.com/page.htm ---> example.com
    error.example.com/error ---> example.com

    I have tried many different types of 301 but most seem to make the site go into an endless loop.

    Can anyone help me?

    Thanks,

  2. #2
    zico82's Avatar
    zico82 is offline Contributing User SEO Chat Discoverer (100 - 499 posts)
    Join Date
    Feb 2005
    Location
    England
    Posts
    198
    Rep Power
    199
    RewriteEngine On
    RewriteRule ^whateverdirectory.*$ http://yoursite.co.uk [R=301,L]
    RewriteCond %{HTTP_HOST} !^yoursite\.co\.uk$ [NC]
    RewriteRule ^(.*)$ http://yoursite.co.uk/$1 [R=301,L]

    this is what I use. This will also forward to non-www. Who needs www these days?.
    Comments on this post
    • tstolber → agrees!

  3. #3
    seokid123 is offline Registered User SEO Chat Explorer (0 - 99 posts)
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0
    I just tried that code but i get an error -

    Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.

    The redirect is just in a loop, is there anyway to stop this?

  4. #4
    imlearner's Avatar
    imlearner is offline SEO Learner SEO Chat Discoverer (100 - 499 posts)
    Join Date
    Feb 2011
    Location
    Delhi
    Posts
    137
    Rep Power
    30
    Don't you have Linux server ?? Did you enabled Apache Mod-Rewrite ?

    Have you tried PHP redirecting ??
    Learning Is My Passion

  5. #5
    seokid123 is offline Registered User SEO Chat Explorer (0 - 99 posts)
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0
    Quote Originally Posted by imlearner
    Don't you have Linux server ?? Did you enabled Apache Mod-Rewrite ?

    Have you tried PHP redirecting ??
    Yes it is on a Linux server, no I haven't tried php redirecting is this an easier way?

  6. #6
    zico82's Avatar
    zico82 is offline Contributing User SEO Chat Discoverer (100 - 499 posts)
    Join Date
    Feb 2005
    Location
    England
    Posts
    198
    Rep Power
    199
    Quote Originally Posted by seokid123
    Yes it is on a Linux server, no I haven't tried php redirecting is this an easier way?
    If you show me your whole .htaccess file, I will fix the problem for you.

  7. #7
    seokid123 is offline Registered User SEO Chat Explorer (0 - 99 posts)
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0
    Quote Originally Posted by zico82
    If you show me your whole .htaccess file, I will fix the problem for you.
    Thanks alot,

    Here is the access file:


    # 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

  8. #8
    zico82's Avatar
    zico82 is offline Contributing User SEO Chat Discoverer (100 - 499 posts)
    Join Date
    Feb 2005
    Location
    England
    Posts
    198
    Rep Power
    199
    Quote Originally Posted by seokid123
    Thanks alot,

    Here is the access file:


    # 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
    Try this. Edit somedir and http://yourwordpresssiteurl.com/

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^somedir.*$ http://yourwordpresssiteurl.com/ [R=301,L]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress


    If you get another prob let me know. But that should work. Just tried it on one of our WP sites with a non existent directory and all was fine.

  9. #9
    seokid123 is offline Registered User SEO Chat Explorer (0 - 99 posts)
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0
    I tried that code but it doesn't seem to have done anything. The website just works as it normally would.

  10. #10
    zico82's Avatar
    zico82 is offline Contributing User SEO Chat Discoverer (100 - 499 posts)
    Join Date
    Feb 2005
    Location
    England
    Posts
    198
    Rep Power
    199
    Quote Originally Posted by seokid123
    I tried that code but it doesn't seem to have done anything. The website just works as it normally would.
    Sorry I am at a loss.

    It works, I know it does.

  11. #11
    seokid123 is offline Registered User SEO Chat Explorer (0 - 99 posts)
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0
    Ah, I've tried it on a different WordPress site we own with a different host and its worked. I think it must be something to do with the server....

    Thanks for your help!

  12. #12
    zico82's Avatar
    zico82 is offline Contributing User SEO Chat Discoverer (100 - 499 posts)
    Join Date
    Feb 2005
    Location
    England
    Posts
    198
    Rep Power
    199
    Quote Originally Posted by seokid123
    Ah, I've tried it on a different WordPress site we own with a different host and its worked. I think it must be something to do with the server....

    Thanks for your help!
    No problems, glad to be of help.

  13. #13
    shankar lal is offline Registered User SEO Chat Explorer (0 - 99 posts)
    Join Date
    Feb 2012
    Posts
    2
    Rep Power
    0

    Thumbs up url rewrite

    can i help me..

    what is rewrite url..


    technic.

  14. #14
    shankar lal is offline Registered User SEO Chat Explorer (0 - 99 posts)
    Join Date
    Feb 2012
    Posts
    2
    Rep Power
    0

    Thumbs up url rewrite

    i guys.

    pls help me ..


    what is url rewrite technic..

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

Similar Threads

  1. How to redirect Search Engine Frinedly / Adsense Friendly
    By chintansoni in forum Google Optimization
    Replies: 3
    Last Post: Mar 4th, 2006, 01:18 PM
  2. Friendly redirect from folder to single page?
    By zigzag in forum Google Optimization
    Replies: 6
    Last Post: Dec 3rd, 2005, 02:32 PM
  3. How to redirect several links to one location?
    By earn100 in forum Search Engine Optimization
    Replies: 10
    Last Post: Nov 14th, 2005, 12:44 PM
  4. oh boy oh boy oh boy redirect problems
    By ChillnVilln in forum Web Design, Coding and Programming
    Replies: 4
    Last Post: Aug 31st, 2004, 10:57 AM
  5. google friendly redirect
    By relaxzoolander in forum Google Optimization
    Replies: 24
    Last Post: Oct 4th, 2003, 08:00 AM

SEO Chat Advertisers and Affiliates