How to create dynamic subdomain using PHP and htaccess in xampp localhost i stored sub domain name in mysql but i wanna check like following in xampp localhost in window platform
means http://example.com/subdomain?=alabaster
i want like this http://alabaster.example.com by php mysql in localhost xampp will u explain it step by step
how to run it localhost xampp window
advance thanx
You can try this code :
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^subdomain=([^&]+)$
RewriteRule ^$ http://%1.example.com? [L,R=301]
Those links might help you :
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.