Anthony
Anthony

Reputation: 3218

WordPress: two WP sites under one webname. How htaccess should be looks like?

I have two WP sites: site.com/ & site.com/de/

These sites have independent DB and WP core.

Option siteurl has value site.com/de/ for the second DB. Also I changed site.com/.htaccess to:

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

# END WordPress 

But it doesn't work. I get 404 error then. Where I'm wrong in htaccess?

Upvotes: 0

Views: 68

Answers (1)

Jimbo Mombasa
Jimbo Mombasa

Reputation: 528

Normally wou should not have to do anything at all!

Das würde ich so machen :) I would do it like this:

on the www.site.com:

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName nextrr.de
AuthUserFile /home/chris/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/chris/public_html/_vti_pvt/service.grp

and on site.com/de/

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

# END WordPress

Upvotes: 1

Related Questions