.htaccess htaccess-重写规则

.htaccess htaccess-重写规则,.htaccess,rewrite,http-status-code-404,rule,.htaccess,Rewrite,Http Status Code 404,Rule,谷歌网站管理员工具给了我一个提示,我有两个完全相同的内容页面 例如: /airports/romania/115.php /airports/romania/115.phphey1 在htacces文件中,我有以下内容: RewriteRule airports/(.*)/([0-9]{1,}).php airports_list.php?airport=$2&country_air=$1 我已经检查了airports_list.php中的所有代码,以及服务器上的所有其他文件。我到处

谷歌网站管理员工具给了我一个提示,我有两个完全相同的内容页面

例如:

/airports/romania/115.php
/airports/romania/115.phphey1
在htacces文件中,我有以下内容:

RewriteRule airports/(.*)/([0-9]{1,}).php airports_list.php?airport=$2&country_air=$1
我已经检查了airports_list.php中的所有代码,以及服务器上的所有其他文件。我到处都找不到“hey1”

为了解决我的问题,我想我必须将像www.mydomain.com/airports/romania/115.phphphy1这样的链接重定向到404页面

我该怎么做

以下内容也在my.htaccess文件中起作用:

ErrorDocument 404 http://www.mydomain.com/404.php 

如果在正则表达式的末尾放一个美元符号,它将停止匹配,因此在“.php”的末尾放一个垃圾并转到404

RewriteRule airports/(.*)/([0-9]{1,}).php$ airports_list.php?airport=$2&country_air=$1

在正则表达式的末尾放一个美元符号。谢谢!我不知道美元符号会在那个时候停止模式匹配,即使“php”之外还有更多字符!谷歌网站管理员工具给了我另外两个页面同样的提示(双重内容):
cityname.html的票证
cityname.html的票证?city=cityname
。tickets-to-cityname.html是使用另一个重写规则创建的:
RewriteRule tickets to-(.*).html$tickets/view tickets.php?city=$1
如何解决此问题(