Welcome Guest, Not a member yet? Register   Sign In
.htaccess can't work in subdomain
#1

[eluser]sisiharmoni[/eluser]
i have write .htaccess file in my public_html like this :

Code:
RewriteEngine on
RewriteRule ^$ index.php [L]
RewriteCond $1 !^(index\.php|template|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ index.php/$1 [L]


but when i want to open my subdomain, it can't work and appear error message :

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@sub.namedomain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.


i have already contact my hosting provider,they said my .htaccess is not corecct

please need advice , how to my subdomain and my domain can work very well ?

thank a lot
#2

[eluser]coldautumn[/eluser]
Yes ,thats correct, 500 html error message occurs when your query is incorrect. 400 html error occur because rewrite_mod is not enabled.

You have to add directory (most probably site name) before index.php

htaccess url rewriting

I suppose, above link can help.
#3

[eluser]sisiharmoni[/eluser]
i am still not understand about your answer..


could give me the example about your answer ?
#4

[eluser]Colin Williams[/eluser]
We're working off of a lot of unknowns, specifically how does your sub-domain resolve compared to the www-domain. The 500 error is likely happening because your rules cause an infinite loop (a condition is never satisfied), probably happening with your first RewriteRule.
#5

[eluser]sisiharmoni[/eluser]
my main domain is namedomain.com

my subdomain is sub.namedomain.com

i use CI framework in namedomain.com but i don't use framework in manage.namedomain.com


when i access my subdomain then appear error 500 Internal Server Error

please need advise?
thank a lot
#6

[eluser]Colin Williams[/eluser]
What is the document root for manage.bizmediahost.com and how does it relate to bizmediahost.com?
#7

[eluser]sisiharmoni[/eluser]
no..there is no relate for document root,that is diferrent
#8

[eluser]Colin Williams[/eluser]
There's always a document root. It is where the domain resolves to on the server.
#9

[eluser]sisiharmoni[/eluser]
the foler document root for manage.namedomain is manage

the folder document root for namedomain is www
#10

[eluser]Colin Williams[/eluser]
Okay... and how do those relate? Same level, manage is a sub-folder of www???




Theme © iAndrew 2016 - Forum software by © MyBB