RewriteEngine On RewriteLog ...\logs\climate2010 RewriteLogLevel 2 # Add a slash if the URL didn't include one to start (don't think we need this) # RedirectRule ^/events/meetings/climate2010$ /events/meetings/climate2010/ [I] # If the URL does not reference a file or direcotry # rewrite the URL so Wordpress will handle the page RewriteCond %{APPL_PHYSICAL_PATH}$2 !-f RewriteCond %{APPL_PHYSICAL_PATH}$2 !-d RewriteRule ^(/events/meetings/climate2010/community((?!/index.php)(?!/wp-)(.*)))$ /events/meetings/climate2010/community/index.php$3 [I,L,QSA] # Don't do anything else with community URLs RewriteRule ^/events/meetings/climate2010/community.*$ - [I,QSA,L] # If the URL references a file or directory in the webroot then do nothing RewriteCond %{APPL_PHYSICAL_PATH}$1 -f [OR] RewriteCond %{APPL_PHYSICAL_PATH}$1 -d RewriteRule ^/events/meetings/climate2010/(.*)$ - [I,L] # If the URL does not reference a file or directory, and if the URL contains index.php # remove the file reference # (used to accommodate URLs from prior to IIRF implementation) RewriteCond %{APPL_PHYSICAL_PATH}$2 !-f RewriteCond %{APPL_PHYSICAL_PATH}$2 !-d RedirectRule ^(.*?)/index.php/(.*?)$ $1/$2 [I] # If the URL does not reference a file or direcotry # rewrite the URL so CakePHP will parse the controller/action RewriteCond %{APPL_PHYSICAL_PATH}$1 !-f RewriteCond %{APPL_PHYSICAL_PATH}$1 !-d RewriteRule ^/events/meetings/climate2010/(.*)$ /events/meetings/climate2010/index.php?url=$1 [I,L,QSA] # If the users aren't accessing part of the site (doesn't seem to work) # RewriteCond %{APPL_PHYSICAL_PATH}$1 -f [OR] # RewriteCond %{APPL_PHYSICAL_PATH}$1 -d # RewriteCond $1 !^/events/meetings/climate2010/app/webroot.*$ # RedirectRule ^(/events/meetings/climate2010/.*)$ /events/meetings/climate2010/ [I]