开发者

What is the modrewrite rule to flatten access to awstats

My current url to access my awstats is

http://my.server.com/awstats/awstats.pl?config=foo

I would like to use apache and mod_rewrite to

http://my.server.com/foo

My attempt is

RewriteRule ^(.*) /awstats/awstats.pl?config=$1 开发者_JS百科[NC]

but I just get a 404.

The error.log doesn't give me much help.


Try adding a $ after so that the entire string is eaten by the regexp, and then use [L] so the rewrite engine knows to stop processing and apply the rule.

Remember to switch on the rewrite engine and set the rewrite base.

RewriteEngine on
RewriteBase /

RewriteRule ^(.*)$ /awstats/awstats.pl?config=$1 [NC,L]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜