Hi, I want to have urls like http://www.example.com/google-ad/star-for-you.html . i have created it before but when i use "-" character in urls, they are not found. i mean, this url (http://www.example.com/google ad/star for you.html) works but the url( http://www.example.com/google-ad/star-for-you.html) doesn't work. i wrote the htaccess code like this: RewriteRule ^lyrics/([0-9]+)/([^./]+)/([^./]+)\.html$ index.php?id=$1&artist=$2&song=$3 Code (markup): you should know, the strings in urls are utf-8 (persian characters). how can i have urls with "-" character thank you
I think your missing the hypen in your first character class. Your second and third should be okay as your using the period to match and if I recall correctly that will match the hypen, so give this one a try: RewriteRule ^lyrics/([-0-9]+)/([^./]+)/([^./]+)\.html$ index.php?id=$1&artist=$2&song=$3 Code (markup):