Home News Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Redirection rewrites.


You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion

Redirection rewrites.
Reply
 
Thread Tools
Old 30-01-2006, 11:33   #1
Legal Alien
 
Join Date: Jun 2003
Services: Cablevision
Posts: 8,183
SMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronze
SMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronze
Redirection rewrites.

Someone posted a solution on this from way back.

If a page 404s on a site I want the site to process it and permanently redirect a different place

e.g

abc123.com/wibble.html 404s so instead of 404ing it it perm directs it to abc123.co.uk/wibble.html

anyone know how?
SMHarman is online now   Reply With Quote
Old 30-01-2006, 12:01   #2
is lurking
 
Jon M's Avatar
 
Join Date: Oct 2003
Location: Bracknell
Age: 30
Services: Freeview, NTL phone, NTL 4mbit BB SACM
Posts: 3,281
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Send a message via MSN to Jon M
Re: Redirection rewrites.

This needs to be added to your .htaccess file in the root folder of your domain webspace.

You can use an absolute reference like so:
Code:
ErrorDocument 404 http://www.mydomain.com/404page.html
or a relative link like so:
Code:
ErrorDocument 404 /directory1/404page.html
__________________
Forum Etiquette | Anti-Spam
'slightly pious, very sanctimonious and far too serious'
information is not a property of matter, it's applied to matter by intelligence
Jon M is offline   Reply With Quote
Old 30-01-2006, 13:07   #3
bah
 
handyman's Avatar
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 32
Services: I want ntl 10mb *stomp*
Posts: 5,291
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: Redirection rewrites.

If you go to cpanel you can edit your 404 file in 'custom error pages'

I use the following :
Code:
<html>
<head>
<meta http-equiv="refresh" content="2;
url=http://www.purplegriffon.com/">
<title>Sorry Page not found -- Redirect to homepage</title>
<body>
Sorry the page you requested no longer exists you are being redirected to our home page.
</body>
<!--
So if you go to www.purplegriffon.com/pagenothere.html you get redirected.

When I get chance I'll do something a bit fancier.
handyman is offline   Reply With Quote
Old 30-01-2006, 13:28   #4
Legal Alien
 
Join Date: Jun 2003
Services: Cablevision
Posts: 8,183
SMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronze
SMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronze
Re: Redirection rewrites.

I've got that bit - it's the fancy bit of taking you from nopagethere.html on one site to nopagethere on the other site, or nopage1 > nopage2. I could put lots and lots of perm redirects in place but I would be here until Christmas.
SMHarman is online now   Reply With Quote
Old 30-01-2006, 13:42   #5
is lurking
 
Jon M's Avatar
 
Join Date: Oct 2003
Location: Bracknell
Age: 30
Services: Freeview, NTL phone, NTL 4mbit BB SACM
Posts: 3,281
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Jon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze arrayJon M has a bronze array
Send a message via MSN to Jon M
Re: Redirection rewrites.

Quote:
Originally Posted by SMHarman
I've got that bit - it's the fancy bit of taking you from nopagethere.html on one site to nopagethere on the other site, or nopage1 > nopage2. I could put lots and lots of perm redirects in place but I would be here until Christmas.
Unless you want custom 404 pages for each site the .htaccess method will do exactly what you asked for.
__________________
Forum Etiquette | Anti-Spam
'slightly pious, very sanctimonious and far too serious'
information is not a property of matter, it's applied to matter by intelligence
Jon M is offline   Reply With Quote
Old 30-01-2006, 16:12   #6
Legal Alien
 
Join Date: Jun 2003
Services: Cablevision
Posts: 8,183
SMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronze
SMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronze
Re: Redirection rewrites.

Quote:
Originally Posted by Jon M
Unless you want custom 404 pages for each site the .htaccess method will do exactly what you asked for.
My .htaccess file looks like this

RedirectMatch permanent ^/$ http://t he.com/
ErrorDocument 404 http://t he.com/404page.html

All that does is dump the viewer back at the home page of t he.com A better place than a 404 page, but still not the page they might have been looking for.
SMHarman is online now   Reply With Quote
Old 31-01-2006, 01:29   #7
Legal Alien
 
Join Date: Jun 2003
Services: Cablevision
Posts: 8,183
SMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronze
SMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronzeSMHarman is cast in bronze
Re: Redirection rewrites.

A few PMs later

Anyone tell me how to code a site wide redirect to it is also markets as permanent when hit by a search engine?
SMHarman is online now   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT +1. The time now is 22:11.


Links
Google
 
Web www.cableforum.co.uk


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
Copyright © 2003 - 2008, Cable Forum.
(s204569790.onlinehome.info)