Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
mod rewrite redirection on ccgi server
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- mod rewrite redirection on ccgi server
mod rewrite redirection on ccgi server
12-02-2008 8:56 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Having had a domain hosted on both html anf ccgi servers I have now moved it completely to the ccgi server and adjusted the DNS appropriately. This all works.
I now want to use a mod rewrite rule to force anyone accessing using the old ccgi address to change to the newly setup www address.
This is the rule I am using:
But this does not work. I have tried several variation all to no effect. Other rewrites (not using the option work okay) just not the re-direct.
Help!
I now want to use a mod rewrite rule to force anyone accessing using the old ccgi address to change to the newly setup www address.
This is the rule I am using:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^ccgi\.scsc\.org\.uk [nc]
RewriteRule ^/(.*) http://www.scsc.org.uk/$1 [R=301,L]
But this does not work. I have tried several variation all to no effect. Other rewrites (not using the
Help!
Message 1 of 6
(2,011 Views)
5 REPLIES 5
Re: mod rewrite redirection on ccgi server
13-02-2008 12:43 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
You do not need to use mod rewrite for this.
Raise a ticket asking support to point www.domainname.
to your cgi space. They will then set up the dns records for the domain.
Raise a ticket asking support to point www.domainname.

Message 2 of 6
(548 Views)
Re: mod rewrite redirection on ccgi server
13-02-2008 1:20 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
How does that stop anyone keying ccgi... in to their browser or using a bookmark of the ccgi address?

jelv (a.k.a Spoon Whittler) Why I have left Plusnet (warning: long post!) Broadband: Andrews & Arnold Home::1 (FTTC 80/20) Line rental: Pulse 8 Home Line Rental (£14.40/month) Mobile: iD mobile (£4/month) |
Message 3 of 6
(548 Views)
Re: mod rewrite redirection on ccgi server
13-02-2008 5:22 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Sorry I misread the OP.
Been looking and wonder if this script http://naterocks.com/php-coding/site-moved-script would be of use.
It gives a warning message and reminds people to update favourites
Been looking and wonder if this script http://naterocks.com/php-coding/site-moved-script would be of use.
It gives a warning message and reminds people to update favourites
Message 4 of 6
(548 Views)
Re: mod rewrite redirection on ccgi server
13-02-2008 9:21 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
How did you do it?
Message 5 of 6
(548 Views)
Re: mod rewrite redirection on ccgi server
14-02-2008 9:47 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: ffupi How did you do it?
I gave up on the Mod Rewrite, it still doesn't work. Instead I have found you can do the same thing in PHP.
if ($_SERVER["HTTP_HOST"] == "http://old.domain") {
header ("HTTP/1.1 301 Moved Permanently");
header ("Location: http://new.domain");
exit;
}
// syntax not checked, working from memory
Better than using Javascript as suggested in Davenports' link since it informs search engine crawlers that it is a permanent move not just a redirection.
I still don't know why the mod rewrite didn't work!
The only other clue was that ....
A later re-write in the same .htaccess changed .htm into .php, but didn't force a redirect
So the rewrite from ccgi to www was working on its own, it just wasnt being send back to the client so the site move was not being seen. Must be something quirky in the PH server setup!
Message 6 of 6
(548 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- mod rewrite redirection on ccgi server