【发布时间】:2019-07-03 05:11:34
【问题描述】:
我的 .htaccess 文件有这个代码:-
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
在搜索引擎优化期间,我的网站显示 2 个 URL 重复错误:- https://example.net/contact-us.php & https://example.net/contact-us 指向同一个资源。因此,我们需要重定向 URL。为此,我编写了以下代码:-
重定向 301 /contact-us.php https://example.net/contact-us/
问题是它显示了太多重定向错误。请帮助。提前致谢。
【问题讨论】: