Web Development Thread, Redirects .. but without the same page name .. in Coding and Web Development; Right, ok, I have googled and tried different things but here's the story...
I've just redone our school website (done ...
1st December 2009, 04:20 PM #1
Redirects .. but without the same page name ..
Right, ok, I have googled and tried different things but here's the story...
I've just redone our school website (done an inbetween solution as they want to bring Moodle on stream properly sometime soon so it's more a static site than anything else) ..
Anyway, the old site was stored in /2 and I've moved the new site to the root so what I want to do is redirect all the:
Accrington St Mary Magdalen's CE Primary School
Now, using the standard:
Is great, only that is maps the old page name (for instance St Mary Magdalen's Primary School) to the new location (http://www.accringtonstmarymagdalens.co.uk/main.shtml) when that page doesn't exist in the new location.
Redirect 301 /2 http://www.accringtonstmarymagdalens.co.uk/
I think I'm writing in looking to do some sort of rewrite, but I'm out of practice with .htaccess files and the things I'm trying don't seem to be working, so, any suggestions?
1st December 2009, 04:32 PM #2
I've always used a HTML meta tag in the header. Works for me...
HTML tips: Redirect to a new page
1st December 2009, 04:37 PM #3
Yeah, problem there is going through the hundreds of pages for the old site (really, you should see it, no page calling of uniform variables on the site, just hundreds of pages of bleurgh) ..
Originally Posted by tmcd35
Plus, HTML Meta Tags are great if you have no other option, but .htaccess redirects are more secure and better for page rankings on search engines and all that jazz ..
1st December 2009, 04:53 PM #4
Something like this should work if you're using mod_rewrite.
RewriteRule ^(.*)$ http://www.accringtonstmarymagdalens.co.uk/ [R=permanent,L]
1st December 2009, 05:10 PM #5
Ta, just tried that but get this :
Originally Posted by webman
It's similar to what I tried before but I just got //main.shtml previously ..
Originally Posted by FireFox Browser
2nd December 2009, 01:57 PM #6
Sussed it (thanks to Beyond Redirect: Using ReWriteRule in .htaccess) ..
Now to get the thing to redirect a non www. site to a www. site without getting the result of http://www.accringtonstmarymagdalens...agdalens.co.uk .. lol ..
RewriteRule ^2/(.+)$ http://www.accringtonstmarymagdalens.co.uk [R=301,NC]
By reggiep in forum Office Software
Last Post: 2nd November 2009, 01:37 PM
By Zorba in forum EduGeek Joomla 1.5 Package
Last Post: 3rd May 2009, 12:51 PM
By SYNACK in forum EduGeek.net Site Problems
Last Post: 20th March 2008, 06:24 AM
By _Bat_ in forum General Chat
Last Post: 10th January 2007, 11:34 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)