Issue with HYPHEN character in Database field
3 posts
• Page 1 of 1
- PixelSurgeon
-
- Posts: 10
- Joined: 07 Nov 2013, 07:39
Issue with HYPHEN character in Database field
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?
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?
- PixelSurgeon
-
- Posts: 10
- Joined: 07 Nov 2013, 07:39
Re: Issue with HYPHEN character in Database field
Just noticed there could be an issue with ([^-]+). Will check.
- PixelSurgeon
-
- Posts: 10
- Joined: 07 Nov 2013, 07:39
Re: Issue with HYPHEN character in Database field
Just realized this should be in the APE category.
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 12 guests