.htaccess htaccess重写规则不适用于magento
这是重写规则在.htaccess中不起作用:.htaccess htaccess重写规则不适用于magento,.htaccess,mod-rewrite,apache2,.htaccess,Mod Rewrite,Apache2,这是重写规则在.htaccess中不起作用: RewriteCond %{REQUEST_URI} ^/magento/resultados-busqueda/ RewriteRule resultados-busqueda/(.*) /magento/index.php/catalogsearch/result/$1 [L,QSA,NC] <IfModule mod_rewrite.c> Options +FollowSymLinks -MultiViews RewriteE
RewriteCond %{REQUEST_URI} ^/magento/resultados-busqueda/
RewriteRule resultados-busqueda/(.*) /magento/index.php/catalogsearch/result/$1 [L,QSA,NC]
<IfModule mod_rewrite.c>
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /magento
RewriteRule ^api/rest api.php?type=rest [QSA,L]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^resultados-busqueda/(.*)$ /magento/index.php/catalogsearch/result/?q=$1 [L,NC]
RewriteRule .* index.php [L]
如果我添加[R]标志,它可以正常工作,但是没有[R]就不能工作
请帮忙
对不起我的英语
谢谢大家! 在
$DOCUMENT\u ROOT/magento/.htaccess
中使用下面的.htaccess代码段:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /magento
RewriteRule ^resultados-busqueda/([^/]+)/?$ /magento/index.php/catalogsearch/result/?q=$1 [QSA,P,NC]
在
$DOCUMENT\u ROOT/magento/.htaccess
中使用下面的.htaccess代码段:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /magento
RewriteRule ^resultados-busqueda/([^/]+)/?$ /magento/index.php/catalogsearch/result/?q=$1 [QSA,P,NC]
URI域/magento/resultados busqueda/pantalones并显示错误404。 这是我的.htaccess:
RewriteCond %{REQUEST_URI} ^/magento/resultados-busqueda/
RewriteRule resultados-busqueda/(.*) /magento/index.php/catalogsearch/result/$1 [L,QSA,NC]
<IfModule mod_rewrite.c>
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /magento
RewriteRule ^api/rest api.php?type=rest [QSA,L]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^resultados-busqueda/(.*)$ /magento/index.php/catalogsearch/result/?q=$1 [L,NC]
RewriteRule .* index.php [L]
选项+以下符号链接-多视图
重新启动发动机
重新编写BASE/magento
重写规则^api/restapi.php?type=rest[QSA,L]
重写规则。*-[E=HTTP\U授权:%{HTTP:AUTHORIZATION}]
RewriteCond%{REQUEST_METHOD}^TRAC[EK]
重写规则。*-[L,R=405]
重写cond%{REQUEST_URI}^/(媒体|皮肤| js)/
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_FILENAME}-L
重写规则^resultados busqueda/(.*)$/magento/index.php/catalogsearch/result/?q=$1[L,NC]
重写规则。*index.php[L]
URI域/magento/resultados busqueda/pantalones并显示错误404。 这是我的.htaccess:
RewriteCond %{REQUEST_URI} ^/magento/resultados-busqueda/
RewriteRule resultados-busqueda/(.*) /magento/index.php/catalogsearch/result/$1 [L,QSA,NC]
<IfModule mod_rewrite.c>
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /magento
RewriteRule ^api/rest api.php?type=rest [QSA,L]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^resultados-busqueda/(.*)$ /magento/index.php/catalogsearch/result/?q=$1 [L,NC]
RewriteRule .* index.php [L]
选项+以下符号链接-多视图
重新启动发动机
重新编写BASE/magento
重写规则^api/restapi.php?type=rest[QSA,L]
重写规则。*-[E=HTTP\U授权:%{HTTP:AUTHORIZATION}]
RewriteCond%{REQUEST_METHOD}^TRAC[EK]
重写规则。*-[L,R=405]
重写cond%{REQUEST_URI}^/(媒体|皮肤| js)/
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_FILENAME}-L
重写规则^resultados busqueda/(.*)$/magento/index.php/catalogsearch/result/?q=$1[L,NC]
重写规则。*index.php[L]
新的Apache版本在某种程度上发生了变化,如果您使用的是Apache 2.4,我建议您更改
etc/apache2/apache2.conf
文件(您需要root权限),如下所示:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
它有效;) 新的Apache版本在某种程度上发生了变化,如果您使用的是Apache 2.4,我建议您更改
etc/apache2/apache2.conf
文件(您需要root权限),如下所示:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
它有效;) Magento是否安装在
/Magento
文件夹下?是的,Magento安装在/Magento文件夹下仍不工作
不提供任何信息帮助您?您在浏览器中尝试了什么URI?您最新的.htaccess是什么?(问题中的粘贴)最后是您遇到了什么错误?我需要一些关于您遇到的错误的信息,例如您尝试在浏览器中打开了什么URI以及您看到了什么错误?此url显示错误404:Magento是否安装在/Magento
文件夹下?是,Magento安装在/Magento文件夹下仍不工作
不提供任何帮助信息?您在浏览器中尝试了什么URI?您最新的.htaccess是什么?(问题中的粘贴)最后,您遇到了什么错误?我需要一些关于您遇到的错误的信息,例如您尝试在浏览器中打开了什么URI以及您看到了什么错误?此url显示错误404: