RewriteLog C:\temp\Nick-iirf-
RewriteLogLevel 4

RewriteFilterPriority HIGH


# don't rewrite any request that ends with one of these extensions
RewriteRule (.+\.)(php|jpg|png|jpeg|gif|ttf|sql|txt|htm|zip|css)$   -   [L]

# Special case pet-friendly and wheelchair-access
RewriteRule wheelchair-access$ /accommodation/listing-all.php?Features=Wheelchair+Access+or+some+disabled+facilities  [L]
RewriteRule pet-friendly$      /accommodation/listing-all.php?Features=Pet+Friendly  [L]

# any .html request gets rewritten to listing-view.php for the given Title
RewriteRule ^/(.*)\.html$ /accommodation/listing-view.php?Title=$1

# anything else  that does not begin with /accomodation  gets rewritten to listing-all.php for the given type
RewriteRule ^/(?!accommodation/)(?!accommodation/.+/.*)(.+)$ /accommodation/listing-all.php?type=$1


## 
## # Incoming URL                                       Expected Result
## #---------------------------------------------------------------------- 
## #
## 
## 
## ###
## ### NOT REWRITTEN
## ###
## 
## /list.txt                                           /list.txt
## /product/list.txt                                   /product/list.txt
## /Components.php                                     /Components.php
## /style.css                                          /style.css
## /files/response.zip                                 /files/response.zip
## /files/image2.png                                   /files/image2.png
## /files/image2.gif                                   /files/image2.gif
## 
## 
## 
## ###
## ### special cases for wheelchair-access and pet-friendly
## ###
## 
## /wheelchair-access                                   /accommodation/listing-all.php?Features=Wheelchair+Access+or+some+disabled+facilities
## /pet-friendly                                        /accommodation/listing-all.php?Features=Pet+Friendly
## 
## 
## 
## 
## ###
## ### .html requests 
## ###
## 
## /Avondale.html                                     /accommodation/listing-view.php?Title=Avondale
## /X.html                                            /accommodation/listing-view.php?Title=X
## /subdir/family9.html                               /accommodation/listing-view.php?Title=subdir/family9
## 
## 
## ### 
## ### Anything else
## ###
## 
## /Dog                                               /accommodation/listing-all.php?type=Dog
## /Frump.oeoeo                                       /accommodation/listing-all.php?type=Frump.oeoeo
## /groups/index.aspx                                 /accommodation/listing-all.php?type=groups/index.aspx
## 
## 

Last edited Oct 6, 2008 at 9:12 PM by Cheeso, version 1

Comments

No comments yet.