php - How to rewrite the my URL like sub domain by using .htaccess -
hi website http://techiesbadi.tk/
here rewrite url test.techiesbadi.tk http://techiesbadi.tk/index.php?sitename=test
i used .htaccess code
options +followsymlinks rewriteengine on rewritebase / rewriterule ^([aa-zz])$ index.php?sitename=$1 rewritecond %{http_host} ^(^.*)\.techiesbadi.tk rewriterule (.*) index.php?sitename=%1
but problem when redirect test.techiesbadi.tk gives webpage not available dns_probe_finished_nxdomain
is there mistake in code please me.
you can see website http://techiesbadi.tk/ here implemented mechanism sub domain creation.
thanks in advance.
i don't see good reason this, it's possible wildcard dns.
currently in dns setup you'd have like:
techiesbadi.tk. 14273 in 31.220.16.205
if add this:
*.techiesbadi.tk. 14273 in 31.220.16.205
hence, requests subdomain of site still route. can parse subdomain within apache's rules, php, whatever.
Comments
Post a Comment