0
我需要使用htaccess保护Joomla CMS中的“单一逻辑”网址。我发现这里.htaccess code to protect a single URL?.htaccess使用查询字符串组合保护网址
该解决方案,这对于一个特定的URL的伟大工程:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/index\.php$
RewriteCond %{QUERY_STRING} ^option=com_content&task=view&id=76$
RewriteRule ^(.*)$ /secure.htm
但是,我怎么能确保该网址的部分不能被交换周围或修订,因此绕过安全访问。例如我不想允许访问
option=com_content&task=view&id=76&dummy=1
option=com_content&id=76&task=view
要么。
我已经试过这一点,这似乎并没有工作:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/index\.php$
RewriteCond %{QUERY_STRING} option=com_content
RewriteCond %{QUERY_STRING} task=view
RewriteCond %{QUERY_STRING} id=76
RewriteRule ^(.*)$ /secure.htm