.htaccess脚本停止链接中断使用302而不是隐藏重定向



我有一个已经ok的htaccess脚本,旨在将/about转发到/about.php而不显示它,但我想知道是否有人知道如何修改我的.htaccess文件以将请求转发到/about.html/about(使用302而不是隐藏的重定向)

CheckSpelling on
Options -Indexes
Options +FollowSymlinks
DirectoryIndex index.php
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ /index.php?page=$1 [L,QSA]

try

RewriteCond %{REQUEST_URI} ^/(.+).html$ [NC]
RewriteRule . /%1    [R=302,L]

最新更新