#1
  1. No Profile Picture
    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
  3. Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Feb 2005
    Location
    England
    Posts
    200
    Rep Power
    200
    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
  4. #3
  5. No Profile Picture
    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?
  6. #4
  7. SEO Learner
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Feb 2011
    Location
    Delhi, India
    Posts
    151
    Rep Power
    31
    Don't you have Linux server ?? Did you enabled Apache Mod-Rewrite ?

    Have you tried PHP redirecting ??
  8. #5
  9. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0
    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?
  10. #6
  11. Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Feb 2005
    Location
    England
    Posts
    200
    Rep Power
    200
    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.
  12. #7
  13. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0
    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
  14. #8
  15. Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Feb 2005
    Location
    England
    Posts
    200
    Rep Power
    200
    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.
  16. #9
  17. No Profile Picture
    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.
  18. #10
  19. Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Feb 2005
    Location
    England
    Posts
    200
    Rep Power
    200
    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.
  20. #11
  21. No Profile Picture
    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!
  22. #12
  23. Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Feb 2005
    Location
    England
    Posts
    200
    Rep Power
    200
    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.
  24. #13
  25. No Profile Picture
    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.
  26. #14
  27. No Profile Picture
    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..

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

IMN logo majestic logo threadwatch logo seochat tools logo