Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 04 Jan 2020, 22:11
pewa pewa is offline
 
Join Date: Feb 2008
Quick htaccess question

Hi,

I have moved my forum from 'domain.com/forum' to only 'domain.com'. The URL structure is the same besides that.

How do I redirect(301) all traffic using htaccess? What to write and where to put the file.

Thanks!

--------------- Added 04 Jan 2020 at 22:24 ---------------

This seems to work:

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^forum/(.*)$ /$1 [R=301,NC,L]

Placed in public_html root
Reply With Quote
  #2  
Old 04 Jan 2020, 22:48
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Real name: Steven
To redirect the entire site, place the .htaccess file at the root of your web folder.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Custom Solutions for your vBulletin

Reply With Quote
  #3  
Old 05 Jan 2020, 12:51
pewa pewa is offline
 
Join Date: Feb 2008
Originally Posted by Hostboard View Post
To redirect the entire site, place the .htaccess file at the root of your web folder.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Ok, does it matter if I do It like that or like my example above?
Reply With Quote
  #4  
Old 05 Jan 2020, 15:00
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
I recommend using the one you use now as it will also redirect the user to the proper URL without "/forum".
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 20:37.

Layout Options | Width: Wide Color: