.htaccess Htaccess Pretty URL阻止访问原始目录(重复页面)

.htaccess Htaccess Pretty URL阻止访问原始目录(重复页面),.htaccess,duplicates,pretty-urls,.htaccess,Duplicates,Pretty Urls,解释 在我的htaccess文件中,我设置了很多URL,例如: RewriteRule ^pricing$ /pages/pricing.php [L] 当用户转到以下url时,它会按预期工作: http://www.example.com/pricing 当用户转到以下位置时,它也会起作用: http://www.example.com/pages/pricing.php 问题 我的问题是如何防止用户在以下位置查看站点: http://www.example.com/pages/pric

解释

在我的htaccess文件中,我设置了很多URL,例如:

RewriteRule ^pricing$ /pages/pricing.php [L]
当用户转到以下url时,它会按预期工作:

http://www.example.com/pricing
当用户转到以下位置时,它也会起作用:

http://www.example.com/pages/pricing.php
问题

我的问题是如何防止用户在以下位置查看站点:

http://www.example.com/pages/pricing.php
301重定向只创建重定向循环

有什么建议吗