Results 1 to 2 of 2

Thread: Redirecting only the top level URL in a domain

  1. #1
    Join Date
    Dec 2009
    Posts
    1

    Redirecting only the top level URL in a domain

    I used to be a COBOL mainframe programmer, so all this newfangled PC stuff is Greek to me, but I have knocked up a couple of websites for my boss and he wants something annoying.

    Our first website is ourdomain.info and it went live first and is static and everything from ourdomain.info/museums/ downwards is just to show to clients, and the top level URL is already Googleable.

    Then our eShop went live into ourdomain.co.uk

    My boss doesn't like that the ourdomainsite shows on Google, allowing people to sneak into his museum section, and wants a redirect on JUST the ourdomaintop level URL to the top level URL.

    All links and lower pages still have to work, and the only way to reach the ourdomainite is to be from a link on the eShop.





    to redirect when you click on the ourdomain.\\

    This works fine, with a fraction of a second to display a 'please click link' if the computer is powered by hamsters in a wheel and can't redirect.

    There are no years of stats to be lost if a spider doesn't follow a redirect; he just wants all customers to be dragged to the shop.

    I tried a subliminal redirect using a 301 redirect in a .htaccess, but using

    Options +FollowSymLinks
    RewriteEngine on


    redirects all pages.

    So.

    What do I put in a .htaccess to redirect ONLY THE TOP LEVEL URL, and still be able to access the rest of the site???

  2. #2
    Join Date
    Feb 2008
    Posts
    2,635

    Re: Redirecting only the top level URL in a domain

    To create a .htaccess file, open notepad, name and save the file as .htaccess (there is no extension). The RewriteCond directive defines a rule condition. Preserve a RewriteRule with one or more RewriteCond directives. Depending on your server configuration it can be necessary to change the examples for your situation. Always try to understand what it really does before you use it. Bad use would lead to deadloops and will hang the server. To do this correctly we have to use an external redirect, so the browser correctly requests subsequent images etc. If we only did a internal rewrite, this would only work for the directory page, but would go wrong when any images are included into this page with relative URLs, because the browser would request an in-lined object. For instance, a request for image.gif in /~quux/foo/index.html would become /~quux/image.gif without the external redirect.

Similar Threads

  1. Replies: 9
    Last Post: 18-12-2011, 12:14 PM
  2. Replies: 1
    Last Post: 30-03-2011, 01:16 AM
  3. Domain functional level
    By purvagarg in forum Active Directory
    Replies: 4
    Last Post: 08-07-2010, 04:37 AM
  4. Domain redirecting to /cgi-sys/defaultwebpage.cgi
    By Caden Fernandes in forum Networking & Security
    Replies: 4
    Last Post: 14-06-2010, 04:56 PM
  5. Rename 2008-level domain with Exchange 2007 present
    By Victor Kam in forum Active Directory
    Replies: 4
    Last Post: 23-07-2009, 11:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,159,053.67222 seconds with 17 queries