Hi Guys I have an issue with the MachII 1.8 routes property and the auto generating Apache Rewrite code which is:
My site is at http://domain/application-directory/ and as such is configured like so: <property name="applicationRoot" value="/application-directory/"/> <property name="eventParameter" value="do"/> <property name="urlBase" value="/application-directory/"/> <property name="urlParseSES" value="true"/> <property name="urlDelimiters" value="/|/|/"/> <property name="urlExcludeEventParameter" value="true"/> <property name="routes" type="MachII.properties.UrlRoutesProperty"> <parameters> <parameter name="rewriteConfigFile"> <struct> <key name="rewriteFileOn" value="true"/> <key name="filePath" value=".htaccess"/> </struct> </parameter> <parameter name="product"> <struct> <key name="event" value="product"/> <key name="urlAlias" value="p"/> <key name="requiredParameters" value="id"/> </struct> </parameter> </parameters> </property> Note the /application-directory/ as the urlBase. This config code produces the following .htaccess file: ## <cfsilent><cfsetting enablecfoutputonly="true"/> ## Date Generated: 4/16/2010 3:28 PM ## Module Name: RewriteEngine on RewriteRule ^/application-directory/p/(.*)$ /application-directory/ index.cfm/p/$1 [PT,L] ## <cfsetting enablecfoutputonly="false"/></cfsilent> Which does not work - I just get 404 when clicking a url produced via buildRouteUrl() However if I change the .htaccess file to: ## <cfsilent><cfsetting enablecfoutputonly="true"/> ## Date Generated: 4/16/2010 3:28 PM ## Module Name: RewriteEngine on RewriteBase /application-directory/ RewriteRule ^p/(.*)$ index.cfm/p/$1 [PT,L] ## <cfsetting enablecfoutputonly="false"/></cfsilent> (Adding RewriteBase and removing the base from the rule) Hope that makes sense - I think that it should work with the site in a subdir - not at root level. Regards Shaun -- You received this message because you are subscribed to Mach-II for CFML list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/mach-ii-for-coldfusion?hl=en SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/ Wiki / Documentation / Tickets: http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/
