这是我的.htaccess
代码:
AddHandler x-httpd-php5-3 .php RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}/index.html !-f RewriteCond %{REQUEST_FILENAME}/index.php !-f RewriteRule . index.php [L] RewriteCond %{THE_REQUEST} /welcome/[/?\s] [NC] RewriteRule ^ / [R=301,L]
答案 0 :(得分:0)
您可以在root .htaccess中使用此规则:
AddHandler x-httpd-php5-3 .php
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} /welcome[/?\s] [NC]
RewriteRule ^ / [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]