Issue with HYPHEN character in Database field

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 10
Joined: 07 Nov 2013, 07:39

Issue with HYPHEN character in Database field

07 Nov 2013, 07:53

Just moved a site to a new provider and they offer the new version of Isapi Rewrite (3.0) using APE. Had to modify the rules and expressions from the old version but generally things seem pretty smooth. The one problem I've encountered is when a hyphen (-) character appears in a database field (not a field name, you understand just a normal field). It works fine with underscores but when it encounters a hyphen it throws a 404.

The rewrite rule I have in the htaccess file is:

RewriteRule ^hotels-([^-]+)/([^-]+).htm /property.asp?Region=$1&URLName=$2

Only throws a 404 when it encounters a hyphen character in a field. I'm using MS SQL Database 2008.

The rule worked fine with MS SQL database 2005 and when I was using the httpd.ini file. Handled the hyphen character ok.

Any ideas or suggestions?

Should I be calling them dashes and not hyphens?

User avatar
Posts: 10
Joined: 07 Nov 2013, 07:39

Re: Issue with HYPHEN character in Database field

07 Nov 2013, 08:04

Just noticed there could be an issue with ([^-]+). Will check.

User avatar
Posts: 10
Joined: 07 Nov 2013, 07:39

Re: Issue with HYPHEN character in Database field

07 Nov 2013, 08:12

Just realized this should be in the APE category.

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 12 guests