I redirect all virtual subdomains as follows.
RewriteCond %{HTTP_HOST} ^(.+)\.mysite\.com$
RewriteRule ^$ subdomain.php?url=%1 [NC,QSA,L]
This way, I get data from the database. All "virtual subdomains". But there is a real subdomain. Opencart inside (shop.mysite.com)
htaccess directs this as well. How do I prevent it from just redirecting the word "shop".
My Full Code:
Options Indexes SymLinksIfOwnerMatch
RewriteEngine on
directoryindex index.php
Options -indexes
RewriteRule index index.php
RewriteCond %{HTTP_HOST} ^(.+)\.mysite\.com$
RewriteRule ^$ subdomain.php?url=%1 [NC,QSA,L]
# www.site.com >> site.com
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]