vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How do i Redirects users back to my forum? (https://vborg.vbsupport.ru/showthread.php?t=151406)

Yellow Slider 07-05-2007 06:17 AM

How do i Redirects users back to my forum?
 
If a user will try to access http://www.mysite.net/notexits
and the file isn't exists, how can i redirect this user back to my site?
i don't want him to see the 404 file, in addition if some one is getting to my site with
http://mysite.net/ and i want him to access with the www, can i redirect that too?
I now that those options are available in vBSEO , but i don't want to use it..
i just need to add some lines in the .hataccess file, but what to put? i want it to fit to Google demands , about redirecting etc'..

Thanks a lot.

Dismounted 07-05-2007 08:28 AM

You can't fit to Google's demands is you redirect back to the main page. Google wants a 404 status, but because the main page "exists", it gives back a 200 (OK) status.

Eikinskjaldi 07-05-2007 09:41 AM

What dismounted said. Basically, dont mess with 404.

As for the other question, put this in your .htaccess

Code:

RewriteEngine on
RewriteCond %{HTTP_HOST}  !^www\.mysite\.com [NC]
RewriteCond %{HTTP_HOST}  !^$
RewriteRule ^/(.*)        http://www.mysite.com/$1 [L,R]


Yellow Slider 07-05-2007 11:10 AM

how can i redirect back to the forum if the page doesn't exists?

and thanks.

Dismounted 07-05-2007 11:26 AM

You said you want to adhere to Google. You can't do that if you redirect to the front page.

Yellow Slider 07-05-2007 11:54 AM

Your are basically saying that Google won't allow to redirect back to the main page if a page doesn't exists ?

Dismounted 07-06-2007 04:12 AM

Yes, because it gives back a 200 status. Google wants a 404 (Page Not Found). Otherwise, every page would "exist".


All times are GMT. The time now is 11:01 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.02530 seconds
  • Memory Usage 1,717KB
  • 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
  • (1)bbcode_code_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