VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    I'm going nuts trying different combos, keep failing too.

    I want http://mysite.com at all times.

    I have content from 6 alias domains:
    http://www.mysite.com
    http://mysite.com
    http://www.my-site.com
    http://my-site.com
    http://test.mysite.com
    http://test.my-site.com

    I need to write an htaccess file, using MOD REWRITE, that will redirect all 6 entries to http://mysite.com


    ALSO NOTE that http://forum.mysite.com is a valid subdomain

    I need to make sure it is the only "forum" domain.
    Again, problems with
    http://forum.test.mysite.com
    http://forum.test.my-site.com
    http://forum.mysite.com
    http://forum.my-site.com

    My eyes are going crossed trying to figure this out.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  2. Member
    Join Date
    Jun 2008
    Location
    portal 666
    Search Comp PM
    don't you want all sites -> http://www.mysite.com? isn't that the one google will look at? i thought they were now ignoring anything without it. i couldn't get their bot to even look at my sitemap without the www recently.
    Quote Quote  
  3. Member thecoalman's Avatar
    Join Date
    Feb 2004
    Location
    Pennsylvania
    Search PM
    In the root of the domain you want to keep:

    Code:
    RewriteCond %{HTTP_HOST} ^www.yoursite\.com$ [NC]
    RewriteRule ^(.*) http://yoursite.com/$1 [QSA,L,R=301]
    
    redirect 301 /forum/ http://forum.yoursite.com/



    For the addtional domains/sub domains you want to redirect to http://yoursite.com I'd set up each domain as a valid domain in the control panel and add a htacess file in each root domain/sub-domain folder. Probably faster method assuming you have root access but that will certainly work. I've not messed around with alias much so I don't know what to suggest is proper easy way. You could try http://www.webmasterworld.com/apache/

    Make sure to check that your sending the right response codes with http://web-sniffer.net/ or something similar.

    Also make sure that it's redirecting to the right page, e.g. http://www.somsite.com/dvd.html should be redirecting too http://yoursite.com/dvd.html if its already been indexed by Google. You don't want to do a mass redirect to one page. This is bad:

    Code:
    redirect 301 /forum/ http://forum.yoursite.com/index.html

    Careful with all the redirection, it might bite you. :wink:
    Quote Quote  
  4. Member thecoalman's Avatar
    Join Date
    Feb 2004
    Location
    Pennsylvania
    Search PM
    Originally Posted by ßsimian
    don't you want all sites -> http://www.mysite.com? isn't that the one google will look at? i thought they were now ignoring anything without it. i couldn't get their bot to even look at my sitemap without the www recently.
    www.yoursite.com and yoursite.com are considered two seperate domains When you redirect to the other domain you're telling Goolge that it's been moved. The 301 number you see in the htaccess rules above tells Google "Move permanently" to the new URL. Addtionally if you get a google webmaster account you can specify the www or non-www version.

    Google can care less which one it is but you only want it indexing one version.
    Quote Quote  
  5. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    This is Apache code, I cannot use it:
    "redirect 301 /forum/ http://forum.yoursite.com/index.html"
    Plus it has always been installed at the subdomain forum.mysite.com, it's never been a subfolder.

    I require ModRewrite code, which comes in this form:
    RewriteCond, RewriteRule

    Altering the hosting/DNS is not an option. Inside Plesk, I've got mysite.com (+www), ..... and then as a domain alias, I've got my-site.com (+www) and test.mysite.com -- this is all inside Plesk 8.4 and there's no way to alter it to another type of hosting option.

    I've got these 6 aliases, and I have to figure out a way to mod rewrite forward them to only show the version I want accessible.

    This is using IIS6 with the installed Micronovae Mod Rewrite Pro (100% compatible to Apache's Mod Rewrite).
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  6. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Don't know if this will help at all : http://www.blogstorm.co.uk/htaccess-mod_rewrite-ultimate-guide/ - first section on canonicalization
    Read my blog here.
    Quote Quote  
  7. Member thecoalman's Avatar
    Join Date
    Feb 2004
    Location
    Pennsylvania
    Search PM
    Well I'm lost as soon as you say Windows... Where are you placing the htacess files, on an apache server they can be placed in any directory. You don';t have to write a single one for every domain but you can make individual ones.

    This takes care of the www issue and will rewrite any url that starts with a www:

    Code:
    RewriteCond %{HTTP_HOST} ^www.yoursite\.com$ [NC]
    RewriteRule ^(.*) http://yoursite.com/$1 [QSA,L,R=301]
    Not sure if it helps or applies to windows server but you can create a subdomain as domain in Plesk, instead of creating it in the domains panel start fresh like you're making a new domain.

    Why not just dump Windows? :P
    Quote Quote  
  8. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    ASP, ASP.NET and MS SQL
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  9. Member thecoalman's Avatar
    Join Date
    Feb 2004
    Location
    Pennsylvania
    Search PM
    Code:
    if ($server == 'windows')
    { 
    echo 'arrrrrrrrrrrrrrrrrrghhh';
    }
    else
    { 
    echo 'Yeeeeeeeea baaaaaaaaby';
    }


    Windows doesn't have it's own redirection or rewrite features? Can you do the redirection with a ASP script?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!