This content has been marked as final. Show 7 replies
Generally speaking, there are two steps involved in doing something like that.
Step 1: create a new .cfm page that accepts product-names in the URL (instead of ID). E.g...
Step 2: install and configure a URL "rewrite" module on your web server. You can then configure a single re-write rule that maps all subdirectory requests to "productByName.cfm?productname=<SUBDIR>"
If you're using Apache as your web server, you can take a look at the mod_rewrite module:
Alternatively, if you're using Microsoft IIS as your web server, you can take a look at the ISAPI_Rewrite module:
You may be able to do what you're asking if you plug in your own 404 error template. The this template would have the "intelligence" to direct the customer to the appropriate native page.
I did not get you what you are saying.
Presentyl i am using the IIS6.
can i do a sample in my local system. I using my PC as test environement. If i can able to do this in my local system then i can upload the same to production.
I wrote a blog entry that details a method of doing what you are trying to do.
I also have an example somewhere if you need it after reading my blog entry let me know
garyrgi touched base on what I was talking about. I had to do this on our main www.shift4.com when we updated it. The problem was that we didn't want to loose all the search engine links when various template names changed or were consolidated.
I wrote a 404.cfm template. In it I created a big list template names specifying the old name and the new name (actually I use an xml document to define this and I also have a parameter of whether to use cflocate vs. dish it out directly using cfinclude or cfcontent -- this way even pdf's or other documents can be found as well).
If I find the template called in the old list, I do whatever action I need to do to send the user to the new location or present the information to the user from the new location. If I don't find a match, then I take the user to our site map with a message that the file requested was not found.
The only tricky part is that in IIS or whatever server you use, somewhere there is a 404 template setting -- you'll need to point this to your 404.cfm template.
It works. Try any of the following links -- both do exactly what I just described (I also pasted my corresponding xml definition just to give you an idea of what I am doing):
thanks for posting, i will look into this idea. I have seen your blog. I feel the idea is good. but i need to test it.