问题
This is the first time that I am trying to use ISAPI_Rewrite and ColdFusion. My hosting company has a wiki which says I need to create an .htaccess
file and add the following rules to it:
RewriteEngine on
RewriteRule ^(.*?\.cfm)/([^/]*)/([^/]*)(/.+)? $1$4?$2=$3 [NC,LP,QSA
I have 8 main pages for my website:
- index.cfm
- products.cfm
- product-detail.cfm
- brands.cfm
- about.cfm
- contact.cfm
- specials.cfm
- gallery.cfm
I have done that. What I would like to know is:
Since I am new to this, are there any other rules that I need to define? I cannot find a decent tutorial on this matter.
Is there any ColdFusion code that I need to add to my Application.cfm page?
Also how would I change this:
products-search.cfm?filter=brand&brand_id=115
to
products-search.cfm/HKSparts
Like I said, this is my first time trying this out.
Any help would be appreciated.
回答1:
If it's an ISAPI_Rewrite then I'm afraid .htaccess
is not the file. Please, see http://www.isapirewrite.com/docs/#conffile. However, if it's ISAPI_Rewrite3, the file format is correct. Try to contact HeliconTech directly. They have a very responsive support team.
来源:https://stackoverflow.com/questions/20950321/isapi-rewrite-and-coldfusion-rules