View Single Post
  #1  
Old 01-13-2012, 04:30 AM
priestjim priestjim is offline
Senior Member
 
Join Date: Mar 2009
Location: Athens, Greece
Posts: 60
Default Erroneous behavior with UTF-8 .htaccess

Hey all,

I've been experiencing a very strange issue with a website that uses UTF-8 regular expressions in the rewrite rules:

RewriteRule ^([0-9a-zA-Zα-ωΑ-Ω_]+)/([0-9a-zA-Zα-ωΑ-Ω_]+)/([0-9a-zA-Zα-ωΑ-Ω_]+)/([0-9a-zA-Zα-ωΑ-Ω_]+)/ index.php?ID=$1&Rec_ID=$2&var1=$3&var2=$4
RewriteRule ^([0-9a-zA-Zα-ωΑ-Ω_]+)/([0-9a-zA-Zα-ωΑ-Ω_]+)/([0-9a-zA-Zα-ωΑ-Ω_]+)/([0-9a-zA-Zα-ωΑ-Ω_]+) index.php?ID=$1&Rec_ID=$2&var1=$3&var2=$4
RewriteRule ^([0-9a-zA-Zα-ωΑ-Ω_]+)/([0-9a-zA-Zα-ωΑ-Ω_]+)/([0-9a-zA-Zα-ωΑ-Ω_]+)/ index.php?ID=$1&Rec_ID=$2&var1=$3
RewriteRule ^([0-9a-zA-Zα-ωΑ-Ω_]+)/([0-9a-zA-Zα-ωΑ-Ω_]+)/([0-9a-zA-Zα-ωΑ-Ω_]+) index.php?ID=$1&Rec_ID=$2&var1=$3
RewriteRule ^([0-9a-zA-Zα-ωΑ-Ω_]+)/([0-9a-zA-Zα-ωΑ-Ω_]+)/ index.php?ID=$1&Rec_ID=$2
RewriteRule ^([0-9a-zA-Zα-ωΑ-Ω_]+)/([0-9a-zA-Zα-ωΑ-Ω_]+) index.php?ID=$1&Rec_ID=$2
RewriteRule ^([0-9a-zA-Zα-ωΑ-Ω_]+)$ index.php?ID=$1
RewriteRule ^([0-9a-zA-Zα-ωΑ-Ω_]+)/$ index.php?ID=$1

As you can see it uses Greek characters. The case goes like this:
- The website has a contact page that runs over the rewrite rules
- When you perform an HTTP POST by submitting the contact form it will not open the rewritten submitted form (that is the thank you for contacting us page) but the submitting page (that is the contact form page). But, if you open the thank you page with a normal GET request, it opens fine. Please note that this is not a software issue, since the exact same files and database operate on an Apache installation as they should.

Litespeed version is latest (4.1.10) and PHP runs over LSAPI 5.5 (5.2.17).

Any help would be appreciated!
__________________
Web hosting, Domain Names, VPS and Dedicated Servers in one of the most secure, reliable, fast and low-cost web hosting services in the European market.

:: dnHost Interactive Agency :: Supporting and providing Litespeed Web Server in all shared hosting and VPS servers since 2008 ::
Reply With Quote