Hi! We have a small problem. Previously we had a main homepage as /news.html but now /index.html (the same as just root "/"). How can we make a 301-redirection from "/news.html" to the "/"?
This is a discussion on How to rewrite /news.html to the / ? within the General Discussion forums, part of the vBulletin SEO Discussion category; Hi! We have a small problem. Previously we had a main homepage as /news.html but now /index.html (the same as ...
Hi! We have a small problem. Previously we had a main homepage as /news.html but now /index.html (the same as just root "/"). How can we make a 301-redirection from "/news.html" to the "/"?
Last edited by Fenriz; 09-22-2007 at 06:50 PM.
Also, how to map common duplicate URLs to a single URL?
http://yourdomain.com
http://yourdomain.com/index.html
http://yourdomain.com/index.htm
http://yourdomain.com/index.php
http://www.yourdomain.com/index.php
http://www.yourdomain.com/index.html
all redirect to:
http://www.yourdomain.com/
http://yourdomain.com/subdir
http://yourdomain.com/subdir/index.html
http://yourdomain.com/subdir/index.htm
http://yourdomain.com/subdir/index.php
http://www.yourdomain.com/subdir/index.php
http://www.yourdomain.com/subdir/index.html
all redirect to:
http://www.yourdomain.com/subdir/
Thanx in advance!
Hello,
you can redirect it with:
Code:RewriteEngine on RewriteRule ^news\.html$ http://www.yourdomain.com/ [L,R=301] RewriteRule ^(.*/)?(?:index\.(?:html?|php))$ http://www.yourdomain.com/$1 [L,R=301]
Last edited by Oleg Ignatiuk; 09-25-2007 at 01:17 PM.
Oleg Ignatiuk / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
- get 500 Internal Server ErrorCode:RewriteRule ^news\.html$ http://ulfdalir.ulver.com/ [L,R=301] RewriteRule ^(.*/)?(?:index\.(?:html?|php))$ http://ulfdalir.ulver.com/$1 [L,R=301]
Do you get it for any URL or for specific link only?
Oleg Ignatiuk / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
.htaccess include the next code:
If I change the last 4 strings to the code you provided:Code:Options -Indexes DirectoryIndex index.html RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.ulfdalir\.ulver\.com$ [NC] RewriteRule ^(.*)$ http://ulfdalir.ulver.com/$1 [L,R=301] rewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/ rewriteRule ^index\.html$ http://ulfdalir.ulver.com/ [R=301,L] rewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /news\.html\ HTTP/ rewriteRule ^news\.html$ http://ulfdalir.ulver.com/ [R=301,L]
, get just "500 Error" on the root http://ulfdalir.ulver.com/Code:RewriteRule ^news\.html$ http://ulfdalir.ulver.com/ [L,R=301] RewriteRule ^(.*/)?(?:index\.(?:html?|php))$ http://ulfdalir.ulver.com/$1 [L,R=301]
Hello,
replied to your support ticket.
Oleg Ignatiuk / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!