我使用的是主.htaccess http://joomla-master-htaccess.googlecode.com/svn-history/r40/trunk/joomla-master-htaccess.txt
我试图为我的RewriteRule模块设置一个k2模块来添加项目,firebug面板向我指出http://www.wyzed.net/component/k2/item/add?tmpl=component将返回一个未找到的404错误
项目/添加?tmpl=组件
我试过了
RewriteRule ^components/com_k2.php$ -L
RewriteRule ^模块/mod_k2_content/tmpl/Default.php$-L
RewriteRule ^模块/mod_k2_content.php$-L
RewriteRule ^components/com_k2/controllers.php$ -L
仍然没有成功,我想知道是否有人使用joomla和k2与主.htaccess添加,知道如何在k2模块中添加一个exeption规则。
发布于 2012-05-25 13:19:47
我想我应该写我自己的答案..。htaccess中有一个名为(高级服务器保护)的部分。
若要使用K2扩展和主.htaccess,请删除以下行
## Disallow visual fingerprinting of Joomla! sites (module position dump)
## Initial idea by Brian Teeman and Ken Crowder, see:
## http://www.slideshare.net/brianteeman/hidden-joomla-secrets
## Improved by @nikosdion to work more efficiently and handle template
## and tmpl query parameters
RewriteCond %{QUERY_STRING} (^|&)tmpl=(component|system) [NC]
RewriteRule .* - [L]
RewriteCond %{QUERY_STRING} (^|&)t(p|emplate|mpl)= [NC]
RewriteRule .* - [F]这一节
## Referrer filtering for common media files. Replace with your own domain name.将最后一行替换为
RewriteRule \.(jp(e?g|2)?|png|gif|bmp|js|swf|ico)$ - [F]以允许从k2加载css。
好好享受吧。
https://stackoverflow.com/questions/10731938
复制相似问题