301 Redirect to single page?

Permalink 1 user found helpful
Hello everyone.

I have redesigned a website using Concrete5. Some of the functionality has been implemented using single pages, which are great.

Now, I'd like to create a 301 redirect from the old page to the new single page. I've read that I can use the Dashboard sitemap for this, by adding the old URL to "paths and locations", but the second textbox for 'other urls' doesn't show there.
I take it this is because it is a single page.

Then how do I add a 301 redirect?
If I try to add a redirect to .htaccess, my entire site fails with an "Internal Server Error". As soon as I remove the line I added, the site works fine again.

This is my (faulty) .htaccess :
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteRule ^news.php$ /news [QSA, NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
# -- concrete5 urls end --

Can anyone spot what I'm doing wrong? Is there a better way to enter 301 redirects?

Thanks a lot for all the help.

 
sniggitysnax replied on at Permalink Reply
sniggitysnax
Here is how I implement 301 redirects and have never had a problem.
<IfModule mod_rewrite.c>
Redirect 301 /prenatal http://dchorizon.net/pre-natal
Redirect 301 /staff http://dchorizon.net/meet-the-staff
Redirect 301 /contact http://dchorizon.net/contact-us
Redirect 301 /faq http://dchorizon.net/faqs
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

So in the above example, the page to be redirected goes directly after the 301 and the page to be redirected to goes directly after that with a preceding space.
BailHope replied on at Permalink Reply
Thanks a lot. This seems to solve my problem!
sniggitysnax replied on at Permalink Reply
sniggitysnax
Glad to help!
sabumnimdk replied on at Permalink Reply
sabumnimdk
Hi Snigg

This looks well, but what if I have, say a site with 50 + pages, do I then need to do this for all of them in my .htaccess or is there a more generel way to perform a 301 redirect ?

Otherwise I will have to do the entire pagetree in this way as suggested :0)

//Carsten
ScottSandbakken replied on at Permalink Reply
ScottSandbakken
This add-on may do what you need.

SEO: 301 Redirects
developed by smartwebprojects
http://www.concrete5.org/marketplace/addons/seo-301-redirects/...
csebe replied on at Permalink Reply
Hi guys,

Thanks for the post, a excellent starting point for solving my problem: I have a site that has bilingual versions (en and ro) and by default I'd like the user to be redirected to the Romanian homepage, i.e.http://www.recolamp.ro -->http://www.recolamp.ro/ro/

I did it until now using "Page Redirect" (http://www.concrete5.org/marketplace/addons/page-redirect/) which is a free add-on and it works very well. The only problem is that it issues a non configurable 302 redirect status code and not the 301 Google/Seo preferred way.

So here it is my small return to the community:
To redirect the root of a website using 301 status code you can use this line in .htaccess:
RedirectMatch 301 ^/$ http://www.recolamp.ro/ro/


This line should be placed before "RewriteEngine On", see where "sniggitysnax" user places his "Redirect" directives.

Also to check that the returned redirect status:http://www.internetofficer.com/seo-tool/redirect-check/...

Cheers!
cainKuri replied on at Permalink Reply
cainKuri
Thank you so much, this help a lot with the multilingual 302 that i was geting... in the sitehttp://cheftech.ca ^_^

At the end of my .htaccess file i have this... is it duplicate ? Thank you for any help.

# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
# -- concrete5 urls end --
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
cainKuri replied on at Permalink Reply
cainKuri
This is the .access i have... is there something wrong here ? what do you think ? Is there to much redirects ? or duplicate content?. Thanks.

RedirectMatch 301 ^/$ http://cheftech.ca/fr/
RewriteEngine on
RewriteCond %{HTTP_HOST} ^cheftech\.ca$ [OR]
RewriteCond %{HTTP_HOST} ^www\.cheftech\.ca$
RewriteRule ^contact$ "http\:\/\/cheftech\.ca\/fr\/contact\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^c5\.plasmamultimedia\.ca$ [OR]
RewriteCond %{HTTP_HOST} ^www\.c5\.plasmamultimedia\.ca$
RewriteRule ^fr\/portfolio\/$ "http\:\/\/cheftech\.ca\/fr\/portfolio\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^c5\.plasmamultimedia\.ca$ [OR]
RewriteCond %{HTTP_HOST} ^www\.c5\.plasmamultimedia\.ca$
RewriteRule ^/?$ "http\:\/\/cheftech\.ca\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.cheftech\.ca$
RewriteRule ^/?$ "http\:\/\/cheftech\.ca\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^cheftech\-ca\.plasmamultimedia\.ca$ [OR]
RewriteCond %{HTTP_HOST} ^www\.cheftech\-ca\.plasmamultimedia\.ca$