需要使用.Htaccess重定向查询字符串

需要使用.Htaccess重定向查询字符串,.htaccess,.htaccess,我在中遇到了一个严重问题。htaccess,我有一个类似以下的URL: http://www.abc.com/xyz.php?title=Video-Tutoring 我需要URL如下所示: http://www.abc.com/Video-Tutoring 这应该只影响xyz.php页面。要在内部重定向视频教程到xyz.php?title=视频教程请使用以下方法: RewriteRule ^/?Video-Tutoring$ xyz.php?title=Video-Tutoring [L

我在
中遇到了一个严重问题。htaccess
,我有一个类似以下的URL:

http://www.abc.com/xyz.php?title=Video-Tutoring 
我需要URL如下所示:

http://www.abc.com/Video-Tutoring
这应该只影响xyz.php页面。

要在内部重定向视频教程xyz.php?title=视频教程请使用以下方法:

RewriteRule ^/?Video-Tutoring$ xyz.php?title=Video-Tutoring [L,QSA]
RewriteRule ^(.*)$ xyz.php?title=$1 [L,QSA]
RewriteRule ^/?Video-Tutoring$ xyz.php?title=Video-Tutoring [R=301,L]
RewriteRule ^(.*)$ xyz.php?title=$1 [R=301,L]
RewriteRule ^/?xyz\.php\?title=Video-Tutoring$ Video-Tutoring [R=301,L]
RewriteRule ^/?xyz\.php\?title=(.*)$ $1 [R=301,L]

要将ANYTHING内部重定向到xyz.php?title=ANYTHING请使用以下命令:

RewriteRule ^/?Video-Tutoring$ xyz.php?title=Video-Tutoring [L,QSA]
RewriteRule ^(.*)$ xyz.php?title=$1 [L,QSA]
RewriteRule ^/?Video-Tutoring$ xyz.php?title=Video-Tutoring [R=301,L]
RewriteRule ^(.*)$ xyz.php?title=$1 [R=301,L]
RewriteRule ^/?xyz\.php\?title=Video-Tutoring$ Video-Tutoring [R=301,L]
RewriteRule ^/?xyz\.php\?title=(.*)$ $1 [R=301,L]

要将用户可见的URL从视频教程重定向到xyz.php?title=视频教程,请使用以下命令:

RewriteRule ^/?Video-Tutoring$ xyz.php?title=Video-Tutoring [L,QSA]
RewriteRule ^(.*)$ xyz.php?title=$1 [L,QSA]
RewriteRule ^/?Video-Tutoring$ xyz.php?title=Video-Tutoring [R=301,L]
RewriteRule ^(.*)$ xyz.php?title=$1 [R=301,L]
RewriteRule ^/?xyz\.php\?title=Video-Tutoring$ Video-Tutoring [R=301,L]
RewriteRule ^/?xyz\.php\?title=(.*)$ $1 [R=301,L]

要将用户可见的URL从ANYTHING重定向到xyz.php?title=ANYTHING请使用以下命令:

RewriteRule ^/?Video-Tutoring$ xyz.php?title=Video-Tutoring [L,QSA]
RewriteRule ^(.*)$ xyz.php?title=$1 [L,QSA]
RewriteRule ^/?Video-Tutoring$ xyz.php?title=Video-Tutoring [R=301,L]
RewriteRule ^(.*)$ xyz.php?title=$1 [R=301,L]
RewriteRule ^/?xyz\.php\?title=Video-Tutoring$ Video-Tutoring [R=301,L]
RewriteRule ^/?xyz\.php\?title=(.*)$ $1 [R=301,L]

要将用户可见的URL从xyz.php?title=Video Tutoring重定向到Video Tutoring,请使用以下命令:

RewriteRule ^/?Video-Tutoring$ xyz.php?title=Video-Tutoring [L,QSA]
RewriteRule ^(.*)$ xyz.php?title=$1 [L,QSA]
RewriteRule ^/?Video-Tutoring$ xyz.php?title=Video-Tutoring [R=301,L]
RewriteRule ^(.*)$ xyz.php?title=$1 [R=301,L]
RewriteRule ^/?xyz\.php\?title=Video-Tutoring$ Video-Tutoring [R=301,L]
RewriteRule ^/?xyz\.php\?title=(.*)$ $1 [R=301,L]

要将用户可见的URL从xyz.php?title=ANYTHING重定向到ANYTHING,请使用以下命令:

RewriteRule ^/?Video-Tutoring$ xyz.php?title=Video-Tutoring [L,QSA]
RewriteRule ^(.*)$ xyz.php?title=$1 [L,QSA]
RewriteRule ^/?Video-Tutoring$ xyz.php?title=Video-Tutoring [R=301,L]
RewriteRule ^(.*)$ xyz.php?title=$1 [R=301,L]
RewriteRule ^/?xyz\.php\?title=Video-Tutoring$ Video-Tutoring [R=301,L]
RewriteRule ^/?xyz\.php\?title=(.*)$ $1 [R=301,L]

我希望这有帮助!
顺便说一句,上面的内容是将
.htaccess
文件放在
RewriteEngine On

一行的后面。您尝试过的代码在哪里?我一直这样嗡嗡叫,我想我需要的正是与此相反的解决方案,将字符串查询到用户友好的url。@DhrubajyotiMondal我刚刚编辑了我的答案以添加此案例场景;)为视频教程干杯它正在工作,但我需要知道如何使其动态?@Dhrubajoyotimondal看到最后一个例子“任何东西”,它可以与任何东西一起工作。。。这是动态的;)@Dhrubajoyotimondal请接受答案,否则请澄清您的问题。干杯