[Melbourne-pm] Apache re-write help
scottp at dd.com.au
Mon Feb 22 01:18:04 PST 2010
On 22/02/2010, at 8:07 PM, Robert Norris wrote:
>> I think what I need is to add this to my .htaccess file
>> RewriteEngine on
>> RewriteRule ^features/([^/]+)/([^/])+/?$ features?title=$1&venue=$2 [L]
> Slightly broken regex there (the repetition operator should come inside
> the capture), but I think that looks about right. You should also add
> the [QSA] (query string append) flag to make sure that, well, the query
> string gets appended :P
It won't rewrite the query string, just append it.
> RewriteRule ^(.*)$ wiki/index.php?title=$1 [L,QSA]
Yes that way round is fine, but you can't do a regex on the left. I.e. you can add a query string of the data on the right.
More information about the Melbourne-pm