Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Joomla使用.htaccess将index.php重定向到index.php/blog_.htaccess_Redirect_Joomla - Fatal编程技术网

Joomla使用.htaccess将index.php重定向到index.php/blog

Joomla使用.htaccess将index.php重定向到index.php/blog,.htaccess,redirect,joomla,.htaccess,Redirect,Joomla,我正在尝试使用.htaccess将index.php重定向到index.php/blog RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+[\s?] RewriteRule ^$ /index.php/blog [R=301,L]` 此代码不起作用。。 请在此问题上帮助我。您可以尝试将此规则作为您的.htaccess中的第一条规则: RewriteEngine On RewriteCond %{THE_REQUEST} \s/+(index\.

我正在尝试使用.htaccess将index.php重定向到index.php/blog

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+[\s?]
RewriteRule ^$ /index.php/blog [R=301,L]`       
此代码不起作用。。 请在此问题上帮助我。

您可以尝试将此规则作为您的.htaccess中的第一条规则:

RewriteEngine On

RewriteCond %{THE_REQUEST} \s/+(index\.php)?[\s?]
RewriteRule ^index\.php$ /index.php/blog/ [R=301,NC,L]

RewriteRule ^(.*)$ /store/$1 [L] 

尊敬的Anubhava先生,感谢您的宝贵反馈。但问题没有解决。URL出现404错误,我不理解您的上一条评论。RewriteEngine on RewriteRule ^.*$/store/$1[L]使用此代码,我找到了解决方案,非常感谢您的合作。