.htaccess 非常简单的301重定向,但无法按预期工作
我想重定向这个链接 到 我正在使用这种方法.htaccess 非常简单的301重定向,但无法按预期工作,.htaccess,redirect,query-string,.htaccess,Redirect,Query String,我想重定向这个链接 到 我正在使用这种方法 Redirect 301 /index_cpath-19\.html http://www.example.com/ 它重定向很好,但会在URL栏中生成以下链接 请建议我如何删除此?从中删除index_cpath-19.html,使其看起来像此解决方案非常适合我的问题 RedirectMatch 301 ^/index_cpath-19.html$ http://www.example.com RewriteCond %{QUERY_STRIN
Redirect 301 /index_cpath-19\.html http://www.example.com/
它重定向很好,但会在URL栏中生成以下链接
请建议我如何删除此?从中删除index_cpath-19.html,使其看起来像此解决方案非常适合我的问题
RedirectMatch 301 ^/index_cpath-19.html$ http://www.example.com
RewriteCond %{QUERY_STRING} ^index_cpath-19.html$
RewriteRule ^(.*)$ http://www.example.com/? [R=301,L]