This is what I have tried but it does not seem to work. I have activated Rewrites in apache2.
Code: Select all
Options +Includes +ExecCGI +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^subdomain\.example\.com$ [NC]
RewriteRule ^((?!subdomain/).*)$ example.com $1 [L,NC]
AddType application/x-httpd-cgi .cgi .pl
AddType text/html .htm
AddHandler server-parsed .shtml .sht .html .htm
I have all my subdomains in my apache2 /etc/apache2/sites-enabled/httpd-vhosts-user.conf.
During my research I have tried many variants but cannot seem to get the syntax.
Like I mentioned, I have many multiple subdomains and have researched on line but with no luck.
**System set up:** I am using ubuntu server 18.04.5, running on a Qnap TS-453D,64-bit x86, Intel® Celeron® J4125 quad-core 2.0 GHz processor, 8GB Mem. Using VirtualizationStation 3 VMs, 6TB Disk Space Raid 5.