Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: REHK on October 16, 2008, 04:32:23 AM

Title: .htaccess problem killing subdomains
Post by: REHK on October 16, 2008, 04:32:23 AM
Hi i am using SMF 1.1.6 with few mods how ever im having problems with my .htaccess file. I have posted a request in the mod thread for 'Pretty URL's' which is the offending mod in this case but no response.

I first approached my host whom correctly pointed out that when the .htaccess was removed from my webroot the access to subdomains was ok then when .htaccess is replaced the subdomains become unavailable again.

My host said "something in your .htaccess file is writing to index.php when it should write to index.html"

Pretty URL's is the only mod I have that has written anything to the .htaccess file. Could someone who understands .htaccess please let me know how to change the file or do I need to live without Pretty URL's?

I would like to resolve this as my host offers SMF 1.15 install via fantastico and I would like to add a resolve to this issue with pretty URL's so I can update the ticket and request that they add the solution to their knowledgebase, so others have an easier time than I have.

<IfModule mod_security.c>
   # Turn off mod_security filtering.  SMF is a big boy, it doesn't need its hands held.
   SecFilterEngine Off

   # The below probably isn't needed, but better safe than sorry.
   SecFilterScanPOST Off
</IfModule>

# Pretty URLs mod
# http://code.google.com/p/prettyurls/
# .htaccess file generated automatically on: October 14, 2008, 10:52

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|about:mozilla|about:unknown|unread|unreadreplies|viewErrorLog|viewmembers|viewprofile)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(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]




Thanks for help in advance :)

Title: Re: .htaccess problem killing subdomains
Post by: REHK on October 17, 2008, 09:35:47 AM
Bump :D
Title: Re: .htaccess problem killing subdomains
Post by: SlammedDime on October 17, 2008, 11:42:35 AM
In your .htaccess file, try adding the following for each directory that the subdomain resides in.  If you have 3 subdomains, you need to have this three times, each with a different folder name.
# disable .htaccess in this path
<Directory /your_directory_name/*>
  AllowOverride None
</Directory>
Title: Re: .htaccess problem killing subdomains
Post by: REHK on October 17, 2008, 05:13:31 PM
Ok thanks for the the suggestion ive tried adding

# disable .htaccess in this path
<Directory /public_html/testing/*>
AllowOverride None
</Directory*>

no good

# disable .htaccess in this path
<Directory /public_html/testing/>
AllowOverride None
</Directory*>

no good

# disable .htaccess in this path
<Directory /public_html/testing/>
AllowOverride None
</public_html/testing>

still no good what am i doing wrong?




Title: Re: .htaccess problem killing subdomains
Post by: SlammedDime on October 17, 2008, 06:26:06 PM
If your .htaccess is already in the 'public_html' directory, then you want to remove 'public_html' from the first one, and remove the * after Directory...

<Directory /testing/*>
AllowOverride None
</Directory>
Title: Re: .htaccess problem killing subdomains
Post by: REHK on October 18, 2008, 05:04:41 AM
Thanks slammeddime I tried exactly as youve said but still no go. Ive mailed back to my host saying what im trying to do, so hopefully they wont give me the we dont support SMF line. Any other suggestions are very welcome, as nobody else had this problem?

Thanks in advance
Title: Re: .htaccess problem killing subdomains
Post by: Dannii on October 18, 2008, 05:13:46 AM
No luck without the first slash?