Jump to content

Allowing special characters in URL rewrite rule


adrianTNT

Recommended Posts

Hello.

I want to have a photo album URL that looks like this:

 

/pictures/christmas-pictures-1020/christmas-lights-234.html

 

That is album title - album id / photo title - photo id ^.

 

My current rule:

RewriteRule ^pictures/(.*)-([0-9]+)/(.*)-([0-9]+).html$ ...

 

I want to allow special characters in these titles, characters like ţîş that is why the (.*) but I assume this is not right because any_character can also be a slash.

I tried to replace (.*) with [a-zA-Z] but that one does't include special characters ?!

What would be the solution? Maybe I can just add a condition where title can be any char but not "/", if this is a good solution then how do I write this "not slash" condition ?

 

Thank you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.