DIY Themes Forums  

Go Back   DIY Themes Forums > Thesis Theme > Troubleshooting Thesis
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-28-2008, 11:50 PM
Junior Member
 
Join Date: Jul 2008
Posts: 12
Default Can I Easily Change My Blog Directory WITHOUT screwing up links?

Hey Guys!

I have a blog on:

Muscle building secrets that help you build muscle fast — "Double Your Gains"

And I'd like to put the blog on the root directory:

Muscle building - build muscle fast - supplement and creatine info

And use thesis as my CMS basically, with a static Home page (basically the same content as what is on the root home page now) but with all the other goodies, basically they can check out the blog page and other things if they'd like to.

Sort of like what this fella has done:

Build Muscle & Lose Fat Through Strength Training | StrongLifts.com

He has like an "intro" page as his static home page, and then the blog on a page in his navigation menu... seems more people AND google friendly.

Is there any way to do this easily, without screwing up my internal links and people getting a ton of 404 messages?

Thanks!
Caleb

Last edited by calebo : 08-28-2008 at 11:52 PM.
Reply With Quote
  #2 (permalink)  
Old 08-30-2008, 08:06 AM
Senior Member
 
Join Date: Jul 2008
Location: Sydney, Australia
Posts: 376
Default htaccess rewrite

The only way I know how to do this is to use a redirect (or rewrite) in your .htaccess file (if you have access to it, some hosts don't allow htaccess, but most do). If you don't have that file in your root directory you can create one.

This site should help with specifics.
__________________
kristarella.com – a blog about design, photography, Macs, Christianity, and other random life stuff

Did you try validating?
How to ask questions the smart way – help us to help you
Reply With Quote
  #3 (permalink)  
Old 08-30-2008, 05:33 PM
Senior Member
 
Join Date: Jul 2008
Location: Connersville, IN
Posts: 2,244
Send a message via ICQ to kingdomgeek Send a message via AIM to kingdomgeek Send a message via MSN to kingdomgeek Send a message via Yahoo to kingdomgeek
Default

A bit simpler .htaccess method would be to use the following line:

Code:
Redirect /blog/ http://doubleyourgains.com/
Note that anything in the /blog/ subdirectory will be redirected to the same directory or filename at doubleyourgains.com's root folder.
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator)
[ Thesis Manual | Help, my posts don't show up! ]


Amazon Wishlist | My custom.css
Get Thesis! | Earn Cash as a DIY Affiliate!
Reply With Quote
  #4 (permalink)  
Old 08-31-2008, 02:42 AM
Senior Member
 
Join Date: Jul 2008
Location: Sydney, Australia
Posts: 376
Default

Maybe we should mention too that there's a specific process that you have to go through when moving the blog – you have to change the address of the blog on the options page (at which point your blog will break and there's no going back) then you move the files to the root directory (and then it should work again).

Any of the link generated by wordpress will automatically be changed.
__________________
kristarella.com – a blog about design, photography, Macs, Christianity, and other random life stuff

Did you try validating?
How to ask questions the smart way – help us to help you
Reply With Quote
  #5 (permalink)  
Old 08-31-2008, 05:01 AM
Senior Member
 
Join Date: Jul 2008
Location: Connersville, IN
Posts: 2,244
Send a message via ICQ to kingdomgeek Send a message via AIM to kingdomgeek Send a message via MSN to kingdomgeek Send a message via Yahoo to kingdomgeek
Default

Alternatively, the Wordpress address & blog address can be defined in your wp-config.php file (found in the root of your site -- the file which contains your database information):

PHP Code:
define('WP_SITEURL''http://example.com/');
define('WP_HOME','http://example.com/'); 
Adding the URLs to wp-config.php directly overrides anything you may have had set in your admin panel.

More information.
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator)
[ Thesis Manual | Help, my posts don't show up! ]


Amazon Wishlist | My custom.css
Get Thesis! | Earn Cash as a DIY Affiliate!
Reply With Quote
  #6 (permalink)  
Old 08-31-2008, 07:06 AM
Senior Member
 
Join Date: Jul 2008
Location: Sydney, Australia
Posts: 376
Default

Quote:
Originally Posted by kingdomgeek View Post
Alternatively, the Wordpress address & blog address can be defined in your wp-config.php file (found in the root of your site -- the file which contains your database information):

PHP Code:
define('WP_SITEURL''http://example.com/');
define('WP_HOME','http://example.com/'); 
Adding the URLs to wp-config.php directly overrides anything you may have had set in your admin panel.

More information.
I love how much stuff I learn by interacting on forums! I didn't know that wp-config thing.
__________________
kristarella.com – a blog about design, photography, Macs, Christianity, and other random life stuff

Did you try validating?
How to ask questions the smart way – help us to help you
Reply With Quote
  #7 (permalink)  
Old 09-02-2008, 04:50 PM
Junior Member
 
Join Date: Jul 2008
Posts: 12
Default

Thank you so much guys for the information.

So it seems the simplest way is to edit the wp-config.php file, correct?

One more question... For blog posts where I have manually linked to other blog posts... (ex: this one where I have linked to two other blog posts in the first paragraph) is there any way to change those without having to go through each blog post manually and change the address?
Reply With Quote
  #8 (permalink)  
Old 09-03-2008, 03:14 AM
Senior Member
 
Join Date: Jul 2008
Location: Connersville, IN
Posts: 2,244
Send a message via ICQ to kingdomgeek Send a message via AIM to kingdomgeek Send a message via MSN to kingdomgeek Send a message via Yahoo to kingdomgeek
Default

Here's a basic step-by-step for you:

1) Move all of your files from /blog/ to /

2) Add the code above to your wp-config.php file so that WordPress will know it is now at the root of your domain rather than the subdirectory. It'll look like this:

PHP Code:
define('WP_SITEURL''http://doubleyourgains.com/');
define('WP_HOME','http://doubleyourgains.com/'); 
3) Add this line to the top of your .htaccess file:

Code:
Redirect /blog/ http://doubleyourgains.com/
4) Enjoy.

The redirect in step 3 will cause all of your old links to redirect properly to your blog's new location, and search engines should have no problem with that.
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator)
[ Thesis Manual | Help, my posts don't show up! ]


Amazon Wishlist | My custom.css
Get Thesis! | Earn Cash as a DIY Affiliate!
Reply With Quote
  #9 (permalink)  
Old 09-04-2008, 08:03 PM
Junior Member
 
Join Date: Jul 2008
Posts: 12
Default

Rick,

At first the site just kept reloading the index page.

But after a few minutes for some reason it just started working correctly? I have no idea why but I'm happy it is!

Thanks!
Caleb

Last edited by calebo : 09-04-2008 at 08:25 PM.
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:02 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0