.htaccess and Subdomains

Discussion in 'Apache' started by BenderFry, Oct 14, 2008.

  1. #1
    Hey there,

    I need some help - I set up subdomains via cpanel so that I get
    /public_html/*****

    However whenever I go on subdomain.domain.com I get a 404 error... :mad:

    I have contacted Hostgator support and they told me that my problem lies in the .htaccess file in /public_html/

    #	Pretty URLs mod
    #	http://code.google.com/p/prettyurls/
    #	.htaccess file generated automatically on: August 14, 2008, 8:21
    
    RewriteEngine on
    
    #	
    Rules for: actions
    RewriteRule ^(activate|admin|announce|ban|boardrecount|buddy|calendar|cleanperms)/?$ ./index.php?pretty;action=$1 [L,QSA]
    
    RewriteRule ^(collapse|convertentities|convertutf8|coppa|deletemsg|detailedversion|display|dlattach)/?$ ./index.php?pretty;action=$1 [L,QSA]
    
    RewriteRule ^(dumpdb|editpoll|editpoll2|featuresettings|featuresettings2|findmember|help|helpadmin)/?$ ./index.php?pretty;action=$1 [L,QSA]
    
    RewriteRule ^(im|jsoption|jsmodify|lock|lockVoting|login|login2|logout)/?$ ./index.php?pretty;action=$1 [L,QSA]
    
    RewriteRule ^(maintain|manageattachments|manageboards|managecalendar|managesearch|markasread|membergroups|mergetopics)/?$ ./index.php?pretty;action=$1 [L,QSA]
    
    RewriteRule ^(mlist|modifycat|modifykarma|modlog|movetopic|movetopic2|news|notify)/?$ ./index.php?pretty;action=$1 [L,QSA]
    
    RewriteRule ^(notifyboard|optimizetables|packageget|packages|permissions|pgdownload|pm|post)/?$ ./index.php?pretty;action=$1 [L,QSA]
    
    RewriteRule ^(post2|postsettings|printpage|profile|profile2|quotefast|quickmod|quickmod2)/?$ ./index.php?pretty;action=$1 [L,QSA]
    
    RewriteRule ^(recent|regcenter|register|register2|reminder|removetopic2|removeoldtopics2|removepoll)/?$ ./index.php?pretty;action=$1 [L,QSA]
    
    RewriteRule ^(repairboards|reporttm|reports|requestmembers|search|search2|sendtopic|serversettings)/?$ ./index.php?pretty;action=$1 [L,QSA]
    
    RewriteRule ^(serversettings2|smileys|smstats|spellcheck|splittopics|stats|sticky|theme)/?$ ./index.php?pretty;action=$1 [L,QSA]
    
    RewriteRule ^(trackip|admod|about:mozilla|about:unknown|unread|unreadreplies|viewErrorLog|viewmembers)/?$ ./index.php?pretty;action=$1 [L,QSA]
    
    RewriteRule ^(viewprofile|verificationcode|vote|viewquery|who|\.xml)/?$ ./index.php?pretty;action=$1 [L,QSA]
    
    #	
    Rules for: boards
    RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1.0 [L,QSA]
    
    RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2 [L,QSA]
    
    #	
    Rules for: topics
    RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
    
    RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$ ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]
    
    Code (markup):
    I was told that the last and the 3rd from last line where interfering and that I need to change them or remove em..

    How do I proceed?

    Regards,

    BFry
     
    BenderFry, Oct 14, 2008 IP
  2. Krnl

    Krnl Peon

    Messages:
    60
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #2
    First, comment out the rules that you think are causing the problem and see if the problem goes away.
     
    Krnl, Oct 21, 2008 IP