1

I'm currently using ISAPI Rewrite

I'd interesting in moving my ColdFusion app to Apache and would therefore like to use MOD_Rewrite. Is this possible? Or do I need to rewrite all the rewrites?

AnApprentice
  • 108,152
  • 195
  • 629
  • 1,012
  • 2
    Most rules can be just transferred 1-to-1, barring a fews exceptions. Unless it's a very long list, I'd suggest you post your current rules for a more accurate & definitive answer. – Wrikken Aug 05 '10 at 23:14
  • And if it is a very long list, still post a handful of the rules (which are indicative of them all), and someone can explain any necessary changes, so you'll know how to migrate the rest. :) – Peter Boughton Aug 06 '10 at 00:38
  • How about this rule? RewriteRule /note-view/(\d+)/(.*) /notes/view/index.cfm\?noteID=$1 [I,L] – AnApprentice Aug 06 '10 at 04:25

1 Answers1

0

Mod Rewrite

RewriteCond %{REQUEST_URI} !^./(flex2gateway|jrunscripts|cfide|cfformgateway|railo-context|files|images|javascripts|miscellaneous|stylesheets|robots.txt|sitemap.xml|rewrite.cfm)($|/.$) [NC] RewriteRule ^(.*)$ ./rewrite.cfm/$1 [L]

ISAPI

RewriteRule (^/(flex2gateway|jrunscripts|cfide|cfformgateway|railo-context|files|images|javascripts|miscellaneous|stylesheets|robots.txt|sitemap.xml|rewrite.cfm)($|/.$)) $1 [L,I] RewriteRule ^/(.)$ /rewrite.cfm/$1 [L]

(Taking from ColdFusion on Wheels rewrite rules)

raulriera
  • 714
  • 10
  • 28
  • thanks. With ISAPI Rerewrite I simply add a httpd.ini file in the www root which contains all the rewrite rules and it just works. Is this possible with Apache? or do I need to modify some other existing Apache file? – AnApprentice Aug 06 '10 at 02:12
  • you need to drop a .htaccess file in your www root – raulriera Aug 06 '10 at 13:00