Redirect a blog to the main site


a few years ago, somebody created the website for our association :
We wanted to upgrade it and try wordpress so I one-click install it with a new address :
while the main website was still online to not interrupt anything.

How can I redirect or put the wordpress files into the main website (without /blog at the end)?

many thanks!!!

a few different methods depending on what you want to accomplish with it. first is to just simply copy the file set int he subdirectory over and reconfigure wordpress to the new location. can be a pain sometimes.

if you dont mind having /blog in the url, a simple php location call will work just fine
header(“Location: http://url/subdir”);

or something like thisin an .htaccess file on the main domain…

RewriteCond %{HTTP_HOST} ^(www.)?
RewriteCond %{REQUEST_URI} !^/subdirectory
Rewriterule ^(.*)$ /blog/$1 [L]

i personally prefer to just move all the file in the long run, but then again, i never did it on my own domain, so it’s sort of moot :slight_smile:


in fact I tried to reconfigure wordpress last time (with nursing…org/main & not blog), and now I can’t access it!!
where should I redirect it, maybe I got it wrong?[hr]
I’m trying to copy my files but can’t access webftp…
any idea?

When I’m lazy, I use the panel here and go to Manage Domains and click Edit for my hosted domain. Then I change the Web Directory path so instead of /home/USER/, I add /blog so it reads /home/USER/
And then go into WordPress wp-admin general settings and update the URL.

When I’m not lazy, I use pyr02k1’s method which is the clean way to do it.