Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Redirect URL Get Page Name

Posted on 2014-01-02
5
Medium Priority
?
303 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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 16

Assisted Solution

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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Loops Section Overview

610 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