开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜