Answer the question
In order to leave comments, you need to log in
How to remove subdomain folder from links?
Greetings!
There was a problem with the subdomain links subdomain.site.ru , which is located in the main domain folder on TimeWeb hosting ( /site.ru/public_html/subdomain/*content* ). The incident is that ALL links look like http://subdomain.site.ru/subdomain/*content* , which of course I don't need. And another interesting fact is that this occurs IN ANY CMS .
How to remove the notorious subdomain folder from the address so that links like http://subdomain.site.ru/*content* work?
Below is the content of .htaccess files.
The content of the root .htaccess ( /site.ru/public_html/.htaccess ):
RewriteEngine on
Options -Indexes
RewriteBase /
RewriteCond %{HTTP_HOST} ^subdomain\.site\.ru$
RewriteCond %{REQUEST_URI} !/subdomain/
RewriteRule ^(.*)$ /subdomain/$1 [L]
AddDefaultCharset UTF-8
Options -Indexes
RewriteEngine On
RewriteBase /subdomain/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !favicon.ico
RewriteRule ^(.*)$ ./index.php
# Deny access
<Files "plugins.dat">
order allow,deny
deny from all
</Files>
<Files "plugin.xml">
order allow,deny
deny from all
</Files>
<Files ~ "\.tpl$">
Order allow,deny
Deny from all
</Files>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question