English 中文(简体)
Hhtaccess Joomla k2 的重写规则
原标题:.htaccess RewriteRule for joomla k2

我使用主接驳器http://joomla-master-htccess.googlecode.com/svn-history/r40/trunk/joomla-master-htaccess.txt

试图为我的 k2 模块设置重写规则以添加项目, firebug Net 面板显示我指向 < a href="http://www. wyzed. net/ impact/k2/ item/ add? tmpl= partment" rel="nofollow" >http://www. wyzed. net/ impact/k2/ item/add? tmpl=imple < a href=subt wich 返回一个未找到的404 错误

项目/添加? tmpl=构成部分

我试过这样

重写规则 构件/ com_ k2. php$ - [L]

重写规则 模块/mod_k2_content/tmpl/ Default.php$ - [L]

重写规则 模块/mod_k2_content.php$ - [L]

重写规则 构件/ com_ k2/ 控制器.php$ - [L]

我在想如果有人使用 joomla 和 k2 和 master.htaccess 添加 来找出如何在 k2 模块中添加 exption 规则

问题回答

i thought i would write my own answer... there is a section called ( advanced server protection ) in the htaccess

使用 K2 范围以与 master.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 的 cs 装入...

玩得开心点





相关问题
Ignore symlinks in clean URL s in .htaccess

Example URL: example.com/user /user is both a symlinked directory and a valid URL to content on my site. I user Horde Routes to request the content and all requests to the site go through index.php. ...

.htaccess File Options -Indexes on Subdirectories

I have the following .htaccess line, simple no indexes on root. Options -Indexes What do we add so it propagates to any sub directory instead of having to create one file for each? One .htaccess on ...

Mod Rewrite ignoring -d

After a day or two, I am still fighting with Mod Rewrite. It seems that 60% of my development time is spent battling the server. My current URL structure is such that all http://example.com/xyz and ...

ErrorDocument 404 Not Sending Referrer Information: PHP

I m using a standard htaccess ErrorDocument 404 to redirect users to a new page. In order to customize the 404, I need to know their referrer information (from the page they Tried to visit). $...

Find all htaccess files on server [closed]

I m looking for a Linux command to go through all the directories on my server and find all .htaccess files. The output would be a list of all those files with full path, creation/modification date ...

301 Redirect Help with Dynamic URL s and Multiple Id s

I just did a redesign for www.wildchildclothes.com which has a new URL structure. The old site ran on Zen Cart and had a bad URL structure. Here are some examples of what I want to redirect from: OLD:...

热门标签