Apache 将特定URL重写为另一个特定URL
我最近将Joomla安装升级到1.7。因此,链接系统现在不同了。我的客户有一个FLASH横幅,在FLASH内有特定链接,无法访问原始.fla进行编辑 我想做的是将链接URL从横幅重写为文章id 我的.htaccess中有以下内容,但它没有重定向,我得到一个404错误Apache 将特定URL重写为另一个特定URL,apache,mod-rewrite,Apache,Mod Rewrite,我最近将Joomla安装升级到1.7。因此,链接系统现在不同了。我的客户有一个FLASH横幅,在FLASH内有特定链接,无法访问原始.fla进行编辑 我想做的是将链接URL从横幅重写为文章id 我的.htaccess中有以下内容,但它没有重定向,我得到一个404错误 RewriteEngine on RewriteRule ^index.php?option=com_content&view=article&id=25$ index.php?option=com_content&
RewriteEngine on
RewriteRule ^index.php?option=com_content&view=article&id=25$ index.php?option=com_content&task=view&id=25&Itemid=59 [L]
谢谢!非常感谢您的帮助。您无法在RewriteRule中匹配查询字符串,您必须在RewriteCond中使用%{query\u STRING}变量,如下所示:
RewriteEngine on
RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=25$
RewriteRule ^index.php$ index.php?option=com_content&task=view&id=25&Itemid=59 [L]
谢谢,我会试试的。