Welcome Guest, Not a member yet? Register   Sign In
Htaccess + Subdomain mapping to controller doesn't work.I tryed everything.
#2

[eluser]GIN[/eluser]
I'm not sure, but may be you need separate your .htaccess on 2 parts.
The root .htaccess will be:
Code:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} !^dev.mysite.com$
RewriteCond %{HTTP_HOST} !^www.mysite.com$
RewriteCond %{HTTP_HOST} ([a-zA-Z0-9]*).mysite.com$
RewriteRule ^(.*)$ http://www.mysite.com/home/prizes/%1 [L]

</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

and in you sub folder .htaccess will be:
Code:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /  # I'm not sure about this

RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]

  
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|robots\.txt|css)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

Just try =)


Messages In This Thread
Htaccess + Subdomain mapping to controller doesn't work.I tryed everything. - by El Forum - 11-03-2009, 07:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB