Subdomain as PHP variable, PHP, cPanel, .htaccess – working correctly in less than 7 minutes

Posted by: Admin  :  Category: Cpanel

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

here are files .htaccess and index.php from video : .htaccess: ——————————————- RewriteEngine on RewriteCond %{HTTP_HOST} !^www.your_domain.com RewriteCond %{HTTP_HOST} ^([^.]+).your_domain.com RewriteRule ^$ /index.php?name=%1 [L] ——————————————- index.php: ——————————————-(open php tag) echo $ _GET[‘name’]; ——————————————-(close php tag) i hope it will helps you, here is text version of tutorial too : ——————————————– ——————————————– 1. Add domain to cPanel. 2. Add subdomain called “*.your_domain.com”. 3. Create file .htaccess contains : PHP Code: RewriteEngine on RewriteCond %{HTTP_HOST} !^www.your_domain.com RewriteCond %{HTTP_HOST} ^([^.]+).your_domain.com RewriteRule ^$ /index.php?name=%1 [L] 4. Create file index.php contains : PHP Code: (open php tag) echo $ _GET[‘name’]; (close php tag) 5. open adres www.Test_subdomain.your_domain.com

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

One Response to “Subdomain as PHP variable, PHP, cPanel, .htaccess – working correctly in less than 7 minutes”

  1. MinecraftLewis Says:

    Guys do not watch no full screen difficult to see, go full !

Leave a Reply

*