Solved

Redirect URL Get Page Name

Posted on 2014-01-02
5
293 Views
Last Modified: 2014-01-28
If I have a URL like this

http://www.mysite.com/this-is-my-page/

I want to have the 404 page redirect it to

http://blog.mysite.com/this-is-my-page/

How can I do this?
0
Comment
Question by:theideabulb
  • 2
  • 2
5 Comments
 
LVL 29

Expert Comment

by:becraig
ID: 39752533
This would be based more on your web server / hosting setup as this would be done at the server level instead of a simple page redirect.

Can you provide some more info on your website setup.
0
 

Author Comment

by:theideabulb
ID: 39752537
I am using CF10 Enterprise.  IIS 7.5 Windows 2008R2
0
 

Author Comment

by:theideabulb
ID: 39752680
Here is what I did.  I dumped out the CGI variables on the 404.cfm page I had and noticed the url i needed was in the query_string. So this is what I did and so far its working well.  This will just be temporary until the search engines can catch up with the right urls.

<cfset theString = cgi.query_string>
<cfset strippedString = listlast(thestring,';')>
<cfset newurl = replacenocase(strippedString,'www','blog')>

Open in new window

0
 
LVL 29

Accepted Solution

by:
becraig earned 250 total points
ID: 39752690
ok so I guess I am not clear you want 404's for a SPECIFIC request to go that URL or just any failed requests  ?

If this is for ANY requests to the www.xxx you can use a custom redirect using the steps below:
http://www.orcsweb.com/blog/jamie-furr/how-to-create-custom-error-pages-in-iis-7-5-with-asp-net/
0
 
LVL 15

Assisted Solution

by:Gurpreet Singh Randhawa
Gurpreet Singh Randhawa earned 250 total points
ID: 39764168
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Renaming file after uploading in Coldfusion 4 220
<cfquery> to Excel 5 56
CF 11 throws error after following lock-down procedure 5 41
REReplaceNoCase help 1 14
PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now