Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Changing directory names and htaccess help
Old 06-24-2010, 05:39 PM Changing directory names and htaccess help
TxsBmw's Avatar
Average Talker

Posts: 20
Name: Bridget
Location: Maryland
Trades: 0
Is there a way (using htaccess) to redirect all files within a directory to the exact same file name located in another directory?

Here is what happened. I set up a wp blog (www.household6life.com/blog) made several enteries and added a forum and social networking site plug in to wordpress. The problem is that becauseI added those plugins when you go to the forums it is under www.household6life.com/blog/forums/ which seems silly to me since this is now going from a personal blog to a social networking type site. I would rather it say something like www.household6life.com/hangout/forums/ in other words I want to rename the directory named blog to hangout. However, I have a lot of blog posts and such which will need to be redirected. I know that I can redirect all files in a directory to a specific file. But what I was wondering is if there is way to have each file redirect to the new directory name without having to enter a bunch of redirects in the htaccess. Almost like a wildcard of some sort? So www.mysite.com/blog/forum/yeehaw.html would redirect to www.mysite.com/hangout/forum/yeehaw.html

Basically so the browser will redirect any request with the /blog directory to the same file located in /hangout
__________________
PROUD Military Wife

Please login or register to view this content. Registration is FREE
|

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by JeremyMiller; 06-25-2010 at 03:38 AM.. Reason: Removed links
TxsBmw is offline
Reply With Quote
View Public Profile Visit TxsBmw's homepage!
 
 
Register now for full access!
Old 06-25-2010, 01:34 PM Re: Changing directory names and htaccess help
TxsBmw's Avatar
Average Talker

Posts: 20
Name: Bridget
Location: Maryland
Trades: 0
Nevermind I found it lol. For any others who may wonder, here is what you need to add to your .htaccess file:

Quote:
RewriteRule ^olddir/(.*)$ http://new.com/newdir/$1 [R=301,L]
__________________
PROUD Military Wife

Please login or register to view this content. Registration is FREE
|

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
TxsBmw is offline
Reply With Quote
View Public Profile Visit TxsBmw's homepage!
 
Reply     « Reply to Changing directory names and htaccess help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11968 seconds with 12 queries