1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

.htaccess question

Discussion in 'Cloaking and Content Generators' started by menaice, Mar 22, 2011.

  1. menaice

    menaice Regular Member

    Joined:
    Apr 23, 2009
    Messages:
    207
    Likes Received:
    121
    Location:
    If i> u then exit
    I didn't know where to put this, but i did alot of searching and can't find a real answer to rewrite.


    I would like to know how to setup .htaccess so that my main site's base folder is in a subfolder of public_html.

    In other words:

    /home/myaccount/public_html/subfolder1 (for my main domain)
    /home/myaccount/public_html/subfolder2 (for my first addon domain)
    /home/myaccount/public_html/subfolder3 (for my second addon domain)but when I access my main domain from a browser, I do not want it to show that I am redirecting:

    I want to see:
    http://www.mymaindomain.com/
    and not http://www.mymaindomain.com/subfolder1

    Also, will doing this affect any SEO
     
    Last edited: Mar 22, 2011
  2. menaice

    menaice Regular Member

    Joined:
    Apr 23, 2009
    Messages:
    207
    Likes Received:
    121
    Location:
    If i> u then exit
    I figured it out... so this can be deleted if needed or left up if someone else has the same question here is the rewrite code to make this possible

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www\.)?domainname\.net$ [nc]
    RewriteRule ^(.*)$ /domainnamefolder/$1 [L]
     
    • Thanks Thanks x 1
  3. a1b2c3

    a1b2c3 Newbie

    Joined:
    Mar 3, 2010
    Messages:
    2
    Likes Received:
    0
    Thanks for posting your solution I wanted to know this as well.
     
  4. The Doctor

    The Doctor Jr. VIP Jr. VIP

    Joined:
    Dec 18, 2010
    Messages:
    612
    Likes Received:
    188
    Occupation:
    Computer Scientist, Engineer, Programmer.
    Location:
    ☆☆☆☆☆☆
    it wont hurt your SEO
     
  5. CodeMaster123

    CodeMaster123 Newbie

    Joined:
    Apr 3, 2011
    Messages:
    2
    Likes Received:
    0
    thanks for the solution
     
  6. sw1344

    sw1344 Newbie

    Joined:
    Nov 14, 2010
    Messages:
    22
    Likes Received:
    11
    Neat solution..

    I like it.