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]
精彩评论