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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -