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

[eluser]Twisted1919[/eluser]
I have a normal url that looks like :
http://www.mysite.com/home/prizes/USERNAME
I want to remap it , using DNS wildcards and htaccess to
http://username.mysite.com
I have this htaccess :
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]

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>

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

But will not work , loading www.mysite.com , loads normally but when accessing http://username.mysite.com i get a HTTP 500 error code .
I have read almost all the threads on this forum , but nothing seems to work.
Also , i have a http://dev.mysite.com where i store a copy of the website for development , now when accesing it , it loads the live site instead of the dev one .
I really don't know what to do further ...
Any help would be highly appreciated .
Thank you .


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



Theme © iAndrew 2016 - Forum software by © MyBB