php - Dashes In the Url Causing 404 Error -


i'm working in php (5.2.14) on apache server (1.3.33) mysql, , problem has emerged pretty url's produced our .htaccess file. example, www.example.com/pages/page work, while www.example.com/page/this-other-page not work anymore. if type in underscores instead, 404 goes away, page uri's stored in database dashes, returns "page not found" cms error.

here rewrite rules put in dashes.

rewriterule ^([a-za-z0-9\-\_]+)/([a-za-z0-9\-\_]+)/?$ page.php?module=$1&uri=$2 [l] rewriterule ^([a-za-z0-9\-\_]+)/([a-za-z0-9\-\_]+)/([a-za-z0-9\-\_]+)/?$ page.php?module=$1&uri=$2&sec_uri=$3 [l] rewriterule ^([a-za-z0-9\-\_]+)/([a-za-z0-9\-\_]+)/([a-za-z0-9\-\_]+)/([a-za-z0-9\-\_]+)/?$ page.php?module=$1&uri=$2&sec_uri=$3&tri_uri=$4 [l] 

i suspect there configuration rule on server not dashes, it's not on our server. client hosting elsewhere, , server admin has not helped @ all.

or there php configuration rule might fix it?

as far know, characters in square brackets aren't escaped - try using [a-za-z0-9_-] instead. hyphen should last character otherwise parser tries treat part of range (e.g. a-z).


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

sql server - python to mssql encoding problem -

windows - Python Service Installation - "Could not find PythonClass entry" -