簡體   English   中英

joomla htaccess RewriteRule問題

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM