views:

15

answers:

1

Hi,

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 appreciated

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

A: 

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.

radius
There's no way to do a rewrite with a hard-coded directory name?
Boris
Yes of course you can but ^([^/]*)/Strain/([^/]*)/([^/]*)-([^/]*)$ will match http://mysite.com/San-Diego/Strain/Store-Name/209-Blue-Dream not http://mysite.com/San-Diego/Store-Name/209-Blue-Dream
radius