Php 如何停止将子域重定向到主域

Php 如何停止将子域重定向到主域,php,.htaccess,redirect,Php,.htaccess,Redirect,我在子域中没有任何文件,我的问题是在输入子域url时,它会重定向到主域..如何停止此 这是我的主域访问文件 Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} RewriteRule index.html$ index.php [L] RewriteRule service.html$ service.php

我在子域中没有任何文件,我的问题是在输入子域url时,它会重定向到主域..如何停止此

这是我的主域访问文件

Options +FollowSymlinks
RewriteEngine On

RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

RewriteRule index.html$ index.php [L]
RewriteRule service.html$ service.php [L]
RewriteRule ^([^/]*)\.html$ about.php?pid=$1 [L]
RewriteRule ^cont/([^/]*)\.html$ contact-inner.php?tid=$1 [L]
RewriteRule ^contact/([^/]*)/([^/]*)\.html$ contact-page.php?tid=$1&ona=$2 [L]
RewriteRule ^about/([^/]*)\.html$ about-inner.php?oid=$1 [L]
RewriteRule ^service/([^/]*)/([^/]*)\.html$ service-page.php?oid=$1&ona=$2 [L]



ErrorDocument 404 https://localhost/ezhil/path/public_html/error.php

<Files 403.shtml>
order allow,deny
allow from all
</Files>

deny from 117.202.102.84
deny from 58.68.25.210

deny from 91.200.13.112
deny from 86.128.130.170
deny from 91.200.13.7
deny from 173.208.206.90 

我猜这是你的ErrorDocument规则。两个域的DocumentRoot相同吗?尝试注释错误文档行。@anubhava只有不同的文档根目录存在。htaccess也在子域中吗?@anubhava只有一个htaccess..用于主域