开发者

Literals in Mod_rewrite rules

I have a rule,

RewriteRule ^([^/]*)/Strain/([^/]*)/([^/]*)-([^/]*)$ /strain.php?id=$3&strain=$4&source=$2&area=$1 [L]

However, having the "Strain" in there doesn't seem to work. What would be the correct syntax for a hard-coded directory name?

Thanks :) Any help is much app开发者_StackOverflowreciated

EDIT: eg,http://mysite.com/San-Diego/Store-Name/209-Blue-Dream


In the example you provide, there is no /Strain/ in the query, so it can't match. You may want to remove /Strain from the RewriteRule.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜