Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Jan 2005
    Posts
    6

    Exclamation .htaccess help needed - Important

    I am running couple of sub-domains via our main domain: http://www.mydomain.in
    Sub-domains in use:
    http://forums.mydomain.in
    http://gallery.mydomain.in


    I am having some serious issues with this domain as follows:

    1. Serps + Guests are able to get to my sub-domains from following URLs as well:
    www.mydomain.in/forums/somepage
    forums.mydomain.in/somepage
    000.000.000.000/forums/somepage
    This is creating lot of dupe content, i want to fix this problem, with a 301/permanent re-direct (without loosing any rankings or getting penalties)

    2. I am running a forum software script, any user typing a wrong URL or trying to access any improper location should to be re-directed to the root. I want to achieve following if a user tries to access:
    forums.mydomain.in/showthread.php?t=1233 which does not exists (reason got deleted)
    should be re-directed properly to forums.mydomain.in


    3.
    There are many pages indexed in Google and Yahoo via our Site IP Address as well for example:
    000.000.000.000/forums/somepage
    I want to re-direct such pages to forums.mydomain.in/somepage

    4. While trying to re-direct users from 404 URLs on forum, entire .CSS and image paths appear to be invalid, is there a possible solution for re-directing users from 404 pages to root properly?


    This are my .htaccess files:
    This are the .htaccess files on my domain currently as follows:
    ########################################
    #http://www.mydomain.in/.htaccess#
    ########################################
    ErrorDocument 400 /
    ErrorDocument 401 /
    ErrorDocument 403 /
    ErrorDocument 404 /
    #
    Options +Indexes +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    #
    # Prevent duplicate content on gallery and forums subdomain
    RewriteCond %{HTTP_HOST} ^(gallery|forums)\.mydomain.in
    RewriteRule ^(gallery|forums)(.*)$ http://%{HTTP_HOST}$1 [R=301,L]
    #
    #Re-Direct users coming to forums and gallery via IP Address in SERPs index to proper location
    RewriteCond %{HTTP_HOST} ^000\.000\.000\.000
    RewriteRule ^(gallery|forums)/(.*)$ http://$1.mydomain.in/$2 [R=301,L]
    #
    #Re-Direct users coming to Site via IP Adress to proper location
    RewriteCond %{HTTP_HOST} ^(000\.000\.000\.000|mydomain\.in)
    RewriteRule (.*) http://www.mydomain.in/$1 [R=301,L]
    ########################################

    ########################################
    #http://forums.mydomain.in/.htaccess#
    ########################################
    ErrorDocument 400 /
    ErrorDocument 401 /
    ErrorDocument 403 /
    ErrorDocument 404 /
    #
    Options +Indexes +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    #
    #Re-Direct users coming to /forums/ to proper subdomain
    redirect 301 /forums/ http://forums.mydomain.in/
    ########################################

    ########################################
    #http://gallery.mydomain.in/.htaccess#
    ########################################
    ErrorDocument 400 /
    ErrorDocument 401 /
    ErrorDocument 403 /
    ErrorDocument 404 /
    #
    Options +Indexes +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    #
    #Re-Direct users coming to /gallery/ to proper subdomain
    redirect 301 /gallery/ http://gallery.mydomain.in/
    ########################################

    1. Please check the above codes those are working perfectly fine on my domain currently, if you can further provide some more optimizations if needed please let me know.

    2. Will i face any problems in future/present using those .htaccess codes? I dont wish to loose my listings/rankings.

    3. I dont want to loose the indexed contents via IP Address (lakhs of pages indexed via IP) and also via improper domain handling.
    i.e., www.mydomain.com/forums/ (lakhs of pages indexed via improper domain URL)

  2. #2
    Member
    Join Date
    Jan 2005
    Posts
    6

    Unhappy

    is there anyone on internet who can help me fix my problems ?

Similar Threads & Tags
Similar threads

  1. Help Please Important information needed
    By Karen123 in forum New User Questions
    Replies: 2
    Last Post: 10-12-2007, 05:28 AM
  2. Important
    By moalim in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 07-26-2003, 11:05 AM
  3. main error log help needed - important ish
    By silvernetuk in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 12-11-2002, 07:16 AM
  4. very Very important
    By komal in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 09-12-2002, 09:43 AM
  5. IMPORTANT!
    By bdraco in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-14-2001, 06:48 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube