2
votes

I created subdomain But it's redirect to main domain. For Example : my domain name is mydomain.com and I created subdomain test.mydomain.com But issue is that When open subdomain url it's always redirect to mydomain.com. I want to stop this redirection. Here is .htaccess file text.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
1
Did you configure your httpd?Drew Major

1 Answers

0
votes

I had the same issue and solved it with this as my .htaccess file text:

Options +FollowSymlinks
Options -Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]