htaccess rewrite doesn’t work after installing WordPress

I’ve recently installed WordPress. Since I want it running from the root directory and like some nice looking permalinks i’ve added a new section to my htaccess file on the httpdocs of my server.

Since this time the redirect for other domains isn’t working anymore.

Read More

This is the current code:

Options +FollowSymLinks
RewriteEngine On

#Redirect to other DOMAINS
#----------------
RewriteCond %{HTTP_HOST} (www.)?example1.nl$ [NC]
RewriteCond %{REQUEST_URI} !^/e1/.*$
RewriteRule ^(.*)$ /e1/$1

RewriteCond %{HTTP_HOST} (www.)?example2.nl$ [NC]
RewriteCond %{REQUEST_URI} !^/SR/.*$
RewriteRule ^(.*)$ /SR/$1

#ALTERNATE DOMAINS
# ---------------
RewriteCond %{HTTP_HOST} ^www.gw.nl$ [NC,OR]
RewriteCond %{HTTP_HOST} ^gw.nl$ [NC]
RewriteRule (.*) http://www.gw.info/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^www.cb.nl$ [NC,OR]
RewriteCond %{HTTP_HOST} ^cb.nl$ [NC]
RewriteRule (.*) http://www.gw.info/$1 [R=301,L]

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

# END WordPress

The WordPress site works as it should. Alternate domains works as well. However, the other two sites are totally out of the running, now displaying the main wordpress website.

If I change RewriteRule . /wordpress/index.php [L] to RewriteRule . /index.php [L] it will return an internal server error.

Anybody got a clue what’s the mistake?

Related posts

1 comment

Comments are closed.