301 Redirect In ColdFusion
I need to redirect my site from http://panelteccorp.com/store/index.cfm/category/2/applications.cfm to http://panelteccorp.com/applications.html, and some more pages like this. In t开发者_JAVA百科his application, application.cfm is my default page. When I am trying 301 redirect, all pages are getting redirected to the home page. The whole website is in ColdFusion. Please give some advice on this.
If you just want that specific ColdFusion page to redirect then all you need to do is add this line of code at the top.
<cflocation url='/applications.html' statuscode='301' addtoken='false' />
Should do the trick.
This is not 301 redirect this is known as url rewriting
you can try this code in your .htaccess file
RewriteEngine on
RewriteRule ^applications.html$ /store/index.cfm/category/2/applications.cfm [L]
This will redirect your page to the required one.This way you can do for all
Hope you know about regex...:P
精彩评论