vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   htaccess redirect question (FIXED) (https://vborg.vbsupport.ru/showthread.php?t=222322)

HMBeaty 09-02-2009 07:24 PM

htaccess redirect question (FIXED)
 
Not sure what I'm doing wrong here, I did a test run a few months ago and everything went pretty good, but now, I'm just stuck at the .htaccess file since I can't remember where I got the code to use to redirect how I need it to.

Basically, I just my forums from www.mysite.com/forum/ to www.mysite.com/forums.php with my homepage at index.php.

Now, I just need to redirect all the old url's from when everything was at mysite.com/forum to the new url mysite.com/forums.php

This is how I currently have my .htaccess file but it doesn't work (at least the second bit doesn't)
Code:

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

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/forum/.*$
RewriteRule ^/forum/(.+)$ http://www.usmilitarylife.com/$1 [L,R]

The first bit, don't worry about that as that just redirects all url's to www, its the 2nd bit that I'm having trouble with.

Thanks in advance :)

--------------- Added [DATE]1251949323[/DATE] at [TIME]1251949323[/TIME] ---------------

Ok, got it fixed by adding a .htaccess file to the forum directory with these contents...
Code:

redirect 301 /forum http://www.usmilitarylife.com
It's not how I did it last time, but it works :)


All times are GMT. The time now is 02:32 AM.

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.00973 seconds
  • Memory Usage 1,710KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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