Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 09-03-2009, 02:25 PM
Snowball1 Snowball1 is offline
 
Join Date: Jul 2008
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 09-03-2009, 02:28 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 09-03-2009, 02:35 PM
Snowball1 Snowball1 is offline
 
Join Date: Jul 2008
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 09-03-2009, 02:39 PM
karim004's Avatar
karim004 karim004 is offline
 
Join Date: Aug 2007
Location: Connecticut
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 09-21-2009, 02:02 PM
Snowball1 Snowball1 is offline
 
Join Date: Jul 2008
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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



Please Anymore suggestions?
Reply With Quote
  #6  
Old 09-21-2009, 02:52 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Google? There are lots of sites on the use of htaccess to redirect pages.
Reply With Quote
  #7  
Old 10-22-2009, 10:53 PM
Snowball1 Snowball1 is offline
 
Join Date: Jul 2008
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I searched on google but I couldn't get what I'm looking for. I will be very happy if someone can help me.
Reply With Quote
  #8  
Old 10-22-2009, 11:02 PM
SocialNetworkBuzz SocialNetworkBuzz is offline
 
Join Date: May 2007
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Snowball1 View Post
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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:15 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04285 seconds
  • Memory Usage 2,224KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete