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
Solved

Redirect URL Get Page Name

Posted on 2014-01-02
5
296 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 16

Assisted Solution

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

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
PROBLEM:  How to open a cfwindow or run a function on double click of a cfgrid row. One of my clients wanted to be able to double click on a row item to get more detailed information about a transaction and to be able to modify the line items i…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

856 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