我的主域网站是基于核心php构建的,并且我已经在addon域中安装了wordpress,但是我所有的addon域内部页面都被重定向回主域主页。这是主域中的.htaccess
AddType application/x-httpd-php .xml
RewriteEngine On
#RewriteCond %{HTTP_HOST} ^(www\.)?addondomain\.in
#Rewriterule .* - [L]
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
# [NC] is a case-insensitive match
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)/$ $1.php
#RewriteRule ^cat/([0-9a-zA-Z-]+) categories.php?subcat=$1 [NC,L]
#RewriteRule ^([0-9a-zA-Z-]+)/([0-9]+) $1.php?subcat=$2 [NC,L]
RewriteRule ^(.*)-([0-9]+)$ product-details.php?subnames=$1&proidsd=$2
RewriteRule ^(.*).html$ product-list.php?subname=$1 ErrorDocument 404 https://www.craftiee.com/
<Files ^(*.jpeg|*.jpg|*.png|*.gif)> order deny,allow deny from all </Files>
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|mp3|mpg|mp4|mov|wav|wmv|png|gif|swf|css|js)$"> Allow from All </FilesMatch>
<ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule>
<IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 2 days" </IfModule> <IfModule mod_deflate.c> <FilesMatch "\.(css|js|xml)$">
SetOutputFilter DEFLATE </FilesMatch> </IfModule>
<IfModule mod_headers.c> <FilesMatch "\.(js|css|xml|gz)$">
Header append Vary: Accept-Encoding </FilesMatch> </IfModule>
<IfModule mod_expires.c> ExpiresActive On ExpiresByType image/png A604800 ExpiresByType image/gif A604800 ExpiresByType image/jpg A604800 ExpiresByType image/jpeg A604800 ExpiresByType text/javascript A604800 ExpiresByType application/x-javascript A604800 ExpiresByType text/css A604800 </IfModule>
<FilesMatch "\.(htm|html|css|js)$"> AddDefaultCharset UTF-8 </FilesMatch>
通过更改其中任何一个都破坏了当前站点。因此我可以在我的addondomain.in文件夹中创建新的.htaccess并防止重定向。 任何帮助将不胜感激