I'll give to charity if anyone can please solve

Topics: Developer Forum, Project Management Forum, User Forum
Oct 6, 2008 at 12:38 PM

I am trying to move a PHP website from a Linux server to a Windows server and I'm having terrible problems converting the rewrite rules that were previously within the "accommodation/.htaccess" file to the top level  IsapiRewrite4.ini file.

Could someone please explain how I can modify the following code so that it works within the top level  IsapiRewrite4.ini file ?

#Following code was within top level .htaccess file

#AddType application/x-httpd-php5

RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.mywebsite\.com [NC]
RewriteRule (.*) http://www.mywebsite.com/$1 [R=301,L]

#Following code was within "accommodation/.htaccess

RewriteCond %{REQUEST_URI} !.*\.(php|jpg|png|jpeg|gif|ttf|sql|txt|htm|zip|css)
RewriteCond %{REQUEST_URI} !(wheelchair-access|pet-friendly)
RewriteCond %{REQUEST_URI} !/accommodation/$
RewriteCond %{REQUEST_URI} !/accommodation/.+/.*
RewriteRule (.*)$ /accommodation/listing-all.php?type[]=$1
RewriteCond %{REQUEST_URI} (.*)\.html
RewriteRule (.*)\.html$ /accommodation/listing-view.php?Title=$1
RewriteRule wheelchair-access$ /accommodation/listing-all.php?Features[]=Wheelchair+Access+or+some+disabled+facilities
RewriteRule pet-friendly$ /accommodation/listing-all.php?Features[]=Pet+Friendly

Thanks in advance

Oct 6, 2008 at 9:40 PM
answered in your other thread...