vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   SEO friendly redirect + questions (https://vborg.vbsupport.ru/showthread.php?t=156108)

Iskib 08-24-2007 03:14 AM

SEO friendly redirect + questions
 
I am using forums in the / forums with no landing page.

Now I know a 301 redirect is the best SEO friendly redirect using .htaccess

Code:

Redirect 301 /old/old.html http://www.you.com/new.html
I also want to redirect all http://mydomain.com to http://www.mydomain.com

I can do this with the .htaccess file using this code

Code:

RewriteEngine On
rewritecond %{http_host} ^yoursite.com
rewriteRule ^(.*) http://www.yoursite.com/$1 [R=301,L]

The question I have is can I use both like

Code:

RewriteEngine On
rewritecond %{http_host} ^yoursite.com
rewriteRule ^(.*) http://www.yoursite.com/$1 [R=301,L]
Redirect 301 /old/old.html http://www.you.com/forums

Thanks in advance

Brandon Sheley 08-24-2007 03:49 AM

does it work when you use both ?

Iskib 08-24-2007 04:20 AM

Not sure that is what I am asking. :)

valdet 08-24-2007 02:18 PM

Hi there,
I am facing a similar issue here.

I managed to redirect from http://domain.net to http://www.domain.net with this htaccess trick
Quote:

RewriteEngine On
Rewritecond %{http_host} ^yoursite.net
RewriteRule ^(.*) http://www.yoursite.net/$1 [R=301,L]

My question is how can I redirect http://domain.net/forum to http://www.domain.net/forum ?

The code below does not seem to work.

Quote:

RewriteEngine On
Rewritecond %{http_host} ^yoursite.net/forum
RewriteRule ^(.*) http://www.yoursite.net/forum$1 [R=301,L]
Any clues...

Thanks

Dean C 08-24-2007 02:42 PM

Have you thought about the opposite approach and actually dropping the usage of www. It's somewhat redundant unless you are using an alternative to the www config.

Iskib 08-27-2007 01:38 PM

No I never really thought about dropping the www.

With the www or without the www I still would like to beable to redirect eithier domain.com to www.domain.com and/or www. domain.com to domain.com

I would also like to redirect the same with the /forums

Any ideas would be great.
I mean i know if a user types in domain.com I can redirect to www. or the other way.
Now what is there go directly to the forums ? what would be the code to redriect that ?

Dismounted 08-28-2007 07:01 AM

Code:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^YOURSITEURL\.com$ [NC]
RewriteRule ^(.*)$ http://www.YOURSITEURL.com/$1 [R=301,L]

Redirects everything to include "www.".


All times are GMT. The time now is 04:58 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01237 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete