htaccess 求助!
我的網站htaccess:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
ErrorDocument 404 /404.php
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
子資料夾htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.xxx\.com)?$
RewriteRule ^(.*)$ https://xxx.com/japan/$1 [R=301,L]
</IfModule>
如果輸入 xxx.com/wrong-url 可以正確轉到404.php
但是輸入 xxx.com/japan/wrong-url 卻都不會轉到404.php
Google找不到答案
請問要如何更將子資料夾所有不正確網址(有/ 或 無/)轉至404
|