Slightly more complex .htaccess

Hello Everyone.

I want to include the location name in my links whilst using the location id to select

I currently have this:

#Rewrite page location
RewriteRule  ^location/([0-9]+).html$ /?get_action=location&location_id=$1 [L]

I tried this

#Rewrite page location
RewriteRule  ^location/([0-9]+)_([A-Za-z_]+).html$ /?get_action=location&location_id=$1 [L]

But “no funciona”, as they say in Spain.

This is one solution to your problem I think:

Not really

there is no second variable. It’s just some text that could be anyting.

“anything” represented by a dot (.) in regular expressions.
By the way, a dot before “html” must be escaped with a slash (\)

Thankyou Mr Shrapnel

is a dot any single character?

so .+\.html would match an7y# thi:::ng.html
I believe.

It doesn’t match “.html” since that has no characters before .html, and you specified .+ (+ meaning “repeat this sequence 1 or more times”, the sequence being “.” in this case)