vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Please is there a way to redirect /index.php to forum homepage? (https://vborg.vbsupport.ru/showthread.php?t=222386)

Snowball1 09-03-2009 02:25 PM

Please is there a way to redirect /index.php to forum homepage?
 
I am just wondering if there is a way I can redirect forums.mywebsite.com/index.php to forums.mywebsite.com without the index.php. My forum is such a way that when you type forums.mywebsite.com, it doesn't redirect to forums.mywebsite.com/index.php and when you type forums.mywebsite.com/index.php, it doesn't redirect to forums.mywebsite.com hence I am getting two separate pages with duplicate contents. forums.mywebsite.com has google pagerank but forums.mywebsite.com/index.php has no google pagerank so I will like to redirect forums.mywebsite.com/index.php to forums.mywebsite.com. I will appreciate it if you can help me in simple terms because i know very little about coding. Thanks very much for your support.

Lynne 09-03-2009 02:28 PM

Usually, if you put forums.yoursite.com in your browser url, you are automatically directed to forums.yoursite.com/index.php . What are you being directed to? Do you have an index.html page? If so, you may want to remove it and see if that fixes the problem.

Snowball1 09-03-2009 02:35 PM

in my case the forums.example.com/ doesn't redirect to forums.example.com/index.php and vice versa. they are two separate pages with the same content. I will like to redirect the forums.example.com/index.php to forums.example.com because the forums.example.com/index.php has no pagerank while forums.example.com has. Thanks very much

karim004 09-03-2009 02:39 PM

Redirect the index.php Using a 301 Redirect !
1. if you dont have a .htaccess file, open notepad, name and save
the file as .htaccess (there is no extension).

2. If you already have a .htaccess file on your server,
download it to your desktop for editing.

3. Place this code in your .htaccess file:
PHP Code:

Options +FollowSymLinks
RewriteEngine on
# index.php to /
RewriteCond %{THE_REQUEST} ^[A-Z]{39}\ /.*index\.phpHTTP/
RewriteRule ^(.*)index\.php$ /$[R=301,L



5. Save the .htaccess file

6. Upload this file to the forum folder

Snowball1 09-21-2009 02:02 PM

I tried the code Karim gave but it doesn't work. I keep on getting internal error.



Please Anymore suggestions? :)

Lynne 09-21-2009 02:52 PM

Google? There are lots of sites on the use of htaccess to redirect pages.

Snowball1 10-22-2009 10:53 PM

I searched on google but I couldn't get what I'm looking for. I will be very happy if someone can help me.

SocialNetworkBuzz 10-22-2009 11:02 PM

Quote:

Originally Posted by Snowball1 (Post 1879017)
in my case the forums.example.com/ doesn't redirect to forums.example.com/index.php and vice versa. they are two separate pages with the same content. I will like to redirect the forums.example.com/index.php to forums.example.com because the forums.example.com/index.php has no pagerank while forums.example.com has. Thanks very much

That is because when a browser connects to a site it first looks for index.html then index.htm and then index.php. Reason your seeing your index.php content going to just forums.example.com is because it is still displaying the index file, it just doesn't auto add it to the url. Try a test, change your index to test.php then go to forums.example.com You won't get the index content, you'll get a directory tree listing.. why? because you don't have a index file now.

Because index is your default is also why index.php has no ranking but forums.example.com does.


All times are GMT. The time now is 07:45 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.01208 seconds
  • Memory Usage 1,731KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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