Solved

Redirect URL Get Page Name

Posted on 2014-01-02
5
292 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 28

Expert Comment

by:becraig
Comment Utility
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
Comment Utility
I am using CF10 Enterprise.  IIS 7.5 Windows 2008R2
0
 

Author Comment

by:theideabulb
Comment Utility
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 28

Accepted Solution

by:
becraig earned 250 total points
Comment Utility
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:myselfrandhawa
myselfrandhawa earned 250 total points
Comment Utility
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
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 …
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 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

14 Experts available now in Live!

Get 1:1 Help Now