[英]joomla htaccess RewriteRule issue
我在htaccess中进行了重定向,在我转向SEF URL之前,它在joomla中可以正常工作
RewriteRule ^ m /(.*)/index.php?option=com_seemail&view=mail&guid=$1&itemid=102
但是,当我打开SEF URL时,它将不再起作用-即时通讯直接指向/ home / uncategorised / welcome
这是我的htaccess:
RewriteEngine On
RewriteRule ^m/(.*) /index.php?option=com_seemail&view=mail&guid=$1&itemid=102
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^apply$ /index.php?option=com_loans&view=apply&Itemid=102 [R=301,L,QSA]
RewriteBase /
DirectoryIndex index.php
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
有人可以帮忙吗?
RewriteRule ^apply$ /index.php?option=com_loans&view=apply&Itemid=102 [R=301,L,QSA]
根据上面的代码行,如果url中的“ apply”之后没有任何内容,则应重定向到/index.php?option=com_loans&view=apply&Itemid=102
并停止查看针对该情况的其他规则。
正如您所说,它正在重定向,这意味着它正在工作。
您可以手动打开<yourdomain.com>/index.php?option=com_loans&view=apply&Itemid=102
如果打开并且URL为sef,则将sef url复制到域之后,并用RewriteRule中的/index.php?option=com_loans&view=apply&Itemid=102
替换。
也许应该可以。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.