php - URL Redirection for virtual sub domain -
i have given facility user create there own page , can give url page.
for example have created 1 page namely "jkailash" , given url "jkailash.extrathing". page final url "http://jkailash.extrathing.maindomain.com"
so in front end side displaying page name "jkailash" , on click of link "http://jkailash.extrathing.maindomain.com" redirected.
my problem while doing got "server not found error",
i have tried given below redirect rules no success.
#rewritecond %{http_host} ^(.+)\.maindomain\.com$ [nc]
#rewritecond %{http_host} !^www\.maindomain\.com$ [nc]
#rewriterule ^ http://www.maindomain.com [l,r]
if you've got server not found error
means dns not matching new subdomain.
you should add wildcard dns record in configuration directing *.extrathing.maindomain.com
server.
Comments
Post a Comment