[英]joomla htaccess RewriteRule issue
i have a redirect in my htaccess which works perfectly in joomla before i swicth on SEF URLS 我在htaccess中进行了重定向,在我转向SEF URL之前,它在joomla中可以正常工作
RewriteRule ^m/(.*) /index.php?option=com_seemail&view=mail&guid=$1&itemid=102 RewriteRule ^ m /(.*)/index.php?option=com_seemail&view=mail&guid=$1&itemid=102
however when i switch on SEF URLS then it no longer works - im directed to /home/uncategorised/welcome instead 但是,当我打开SEF URL时,它将不再起作用-即时通讯直接指向/ home / uncategorised / welcome
this is my htaccess : 这是我的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]
can anyone help please ? 有人可以帮忙吗?
RewriteRule ^apply$ /index.php?option=com_loans&view=apply&Itemid=102 [R=301,L,QSA]
based on the above line of code, if there is nothing after "apply" in the url, it should redirect to /index.php?option=com_loans&view=apply&Itemid=102
and stop looking at other rules for the said case. 根据上面的代码行,如果url中的“ apply”之后没有任何内容,则应重定向到/index.php?option=com_loans&view=apply&Itemid=102
并停止查看针对该情况的其他规则。
As you said it is redirecting that means it is working. 正如您所说,它正在重定向,这意味着它正在工作。
Can you manually open the <yourdomain.com>/index.php?option=com_loans&view=apply&Itemid=102
您可以手动打开<yourdomain.com>/index.php?option=com_loans&view=apply&Itemid=102
If it opens and the url is sef, copy the sef url after the domain and replace /index.php?option=com_loans&view=apply&Itemid=102
with that in the RewriteRule. 如果打开并且URL为sef,则将sef url复制到域之后,并用RewriteRule中的/index.php?option=com_loans&view=apply&Itemid=102
替换。
May be that should work. 也许应该可以。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.