Htaccess inside a folder

We are trying to make a change of domain for a wordpress.

The blog is in a subfolder called "blog".

The old domain is

http://www.peluches-et-jouets-en-bois.fr/blog

We want all the pages of the blog to be redirected to :

http://www.peluchesetjouetsenbois.fr/blog

It does work for the home page of the blog, but as soon as we go to another page of the blog, then it doesn't work anymore.

Here is what we have so far.

WordPress

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

    RewriteCond %{HTTP_HOST} ^(www\.)?peluches-et-jouets-en-bois.fr$
    RewriteRule ^(.*)$ http://www.peluchesetjouetsenbois.fr/blog/$1  [L,R=301]
    </IfModule>

    # END Wo

If someone can help us on that, that would be great :)

Thanks a lot

Answers


Place redirection rule before existing WP rules:

RewriteEngine On
RewriteBase /blog/

RewriteCond %{HTTP_HOST} ^(www\.)?peluches-et-jouets-en-bois\.fr$ [NC]
RewriteRule ^(.*)$ http://www.peluchesetjouetsenbois.fr/blog/$1  [L,NE,R=301]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]

Need Your Help

c# - can you make a "weak" assembly reference to a strong named assembly

c# assemblies assembly-signing signed-assembly

For various reasons i would rather not use strong named (signed) assemblies in my project. however, one of the projects is referenced by a sharepoint web part which means it must be signed.

How can a C program on Mac OS/X learn that the user has double-clicked to open an associated file?

c macos file-association

Normally in Obj C, NSApplicationDelegate handles this. But how would I do it in C?