0

I have an automated process which generates urls from the title of venue.

I then use the following line to within my .htaccess to get the url to redirect to the correct path

RewriteRule ^recipes/([\w-]+)/(\d+)$  ./recipes_news.php?i=$2 [L,QSA]

a typical URL looks like the link below

www.site.com/recipes/red-curry-chicken/123

Where the last part of the url is the id used to find the actual recipe information.

For some reason unknown to me, anytime a special character such as "ā" occurs, it breaks the url.

Is there something I am missing in the .htaccess code to capture special chacters?

Thanks

Jms Bnd
  • 1,213
  • 3
  • 13
  • 18

1 Answers1

1

Try changing your regex pattern to:

RewriteRule ^recipes/([^/]+)/(\d+)$  ./recipes_news.php?i=$2 [L,QSA]
Jon Lin
  • 142,182
  • 29
  • 220
  • 220