Welcome Guest, Not a member yet? Register   Sign In
Subdomain rewrite not working
#1

[eluser]Unknown[/eluser]
Hi, the subdomain http://example.startbron.nl should be rewritten to http://startbron.nl/index.php/pagina/index/example but that isn't happening.
Using the rule in the code example i get an internal server error.
When i rewrite it to http://startbron.nl/subdomain.php?pagina=example it works fine.

What am i doing wrong?

Code:
RewriteEngine On
AcceptPathInfo On

#set the default controller loaded when index.php file is requested
RewriteRule ^index\.php$ index.php/home [PT]

#default page loaded when visiting the bare url
RewriteRule ^$ index.php/home [PT]

# rewrite subdomains
RewriteCond %{HTTP_HOST} !www\.startbron\.nl$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([a-z0-9-]+)\.startbron\.nl [NC]
# this one works
# RewriteRule .* subdomain.php?pagina=%2 [PT]
# this one doesn't
RewriteRule .* index.php/pagina/index/%2 [PT]
This is the error from the log file:
Code:
[error] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.
[error] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.


Messages In This Thread
Subdomain rewrite not working - by El Forum - 07-09-2007, 03:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB