Wordpress Rewrite Rules.

#1
Hello,
I have wordpress1 installed to domain.com
When i setup wordpress2 to domain.com/en/ all links keeps redirecting to domain.com

For wordpress2 i created virtual host:
Document root: /home/username/public_html/en
Domain name: domain.com
Domain alias: en.domain.com

With the rewrite rule:

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

# END WordPress
Is the rewrite rule correct?
Thanks.
 
#3
Hello,

Remove "en" part in the rewrite rules.
It still redirects to links from domain.com

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

I see that domain name for en.domain.com is only domain.com. Can you tell what is the end point of this 2 pages. Are they the same or they are different.
 
#8
Litespeed doesn't support rewriteBase...

You can make a Litespeed "Context" to do the same thing, putting the URL prefix in the Context's URI and Location settings.

Or maybe something like this
RewriteRule ^/en/index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /en /en/index.php [L]
 
#10
I dont understand.
How do i setup the context?


Using this:
Code:
RewriteRule ^/en/index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /en /en/index.php [L]
in the rewrite tab does not work still.
Everything works fine apache.
 
Top