开发者

.htaccess tweak needed

I have the following rewrite rule in my .htaccess file:

RewriteRule ^books$ /my/directory/pro/books [NC,L]

It works fine as long as the user does not add a trailing slash, e.g.

mysite.com/books   // works
mysite开发者_如何学编程.com/books/  // doesn't work

How can it be modified to work with or without the trailing slash?


RewriteRule ^books/?$ /my/directory/pro/books [NC,L]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜