Forum Moderators: phranque

Message Too Old, No Replies

Double Move of two sites on the same domain: How can I achieve this?

mod_rewrite, directory, redirect, 301

         

dontforgetmario

11:07 am on Oct 29, 2011 (gmt 0)

10+ Year Member



Hi,

I have a bit of a complex issue for me.

As frontend I had Wordpress and as community I have IPS in this way:

Wordpress:
http://mysite.com


IPS:
http://mysite.com/foro


I have migrated all pages and posts (articles) from wordpress to IPS and I have moved IPS to root directory so IPS is now the main landing web site when users go to
http://mysite.com


I have also moved wordpress to
http://mysite.com/web


So the thing is that many users will still use links to access wordpress Posts or IPS posts and Google will still send users to the old wordpress and IPB posts and articles, once the change has been made.

The directory
http://mysite.com/foro
still exists and a copy of all wordpress files are also in root except the index.php, which is now the index.php from IPS... just in case (I make all these changes last night)

As this is a double move of two websites... I'm very confused about what code I have to write on the .htaccess and if I need .htaccess also in the directories and how to apply a 301 redirect to make the URL changes permanent

This is my actual .htaccess code now on root:


# BEGIN IPS

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END IPS

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /web/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /web/index.php [L]
</IfModule>

# END WordPress



Any help on this will be deeply appreciated... thanks a lot...
Mario

lucy24

11:45 am on Oct 29, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Gosh, that boilerplate looks familiar. I think someone posted the identical code within the last 24 if not 12 hours. Don't be fooled by subject headers; look through the last few days of threads in this Forum.

dontforgetmario

3:33 pm on Oct 29, 2011 (gmt 0)

10+ Year Member



Hi,

I'm more of a web designer, indie films type, so I didn't know what a .htaccess file was for until a couple of days ago :) after some internet research. Then I found this super foro.

If you could point me to the right dirección, I'll be happy to understand the stuff...

Thanks
Mario

wilderness

4:19 pm on Oct 29, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you could point me to the right dirección, I'll be happy to understand the stuff...


Five threads immediately below this one
Redirecting direcotry with wordpress [webmasterworld.com]

Two threads immediately below this one
wordpress mod rewrite - NOOB Failing Hard! [webmasterworld.com]