开发者

htaccess - how to fix this rewrite?

This is our current rewrite:

RewriteRule ^share/([A-z0-9]+)[/{0,1}]?/([A-z0-9]+)[/{0,1}]?$ /mods/share/video.php?video=$1&hash=$2 [L]

Basically, if I visit:

http://www.site.com/share/f7Hje-xxGf/fio2fh92fh9bfh

The page displays a 404 error.

If I remove the - from inbetween the first rewrite, it works fine.

I guess it isn't allowing symbols, how can I f开发者_如何学Goix this?


RewriteRule ^share/([A-z0-9]+)[/{0,1}]?/([A-z0-9]+)[/{0,1}]?$ /mods/share/video.php?video=$1&hash=$2 [L]

adding - to the character-match

RewriteRule ^share/([A-z0-9-]+)[/{0,1}]?/([A-z0-9-]+)[/{0,1}]?$ /mods/share/video.php?video=$1&hash=$2 [L]

cleaning the thing up

RewriteRule ^share/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ /mods/share/video.php?video=$1&hash=$2 [L]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜