with or without www troubles

Using a single web hosting account to host multiple sites

with or without www troubles

Postby badabing » Fri Nov 07, 2008 2:58 am

Hello,

I can't get my domain to work without the subdir.

I have www.liefdeknopen.nl and its installed in liefdeknopen.hoekvanameland.nl (outside VirtualDocumentRoot)

Its accessable thru liefdeknopen.nl (with no subdir) and thru www.liefdeknopen.nl

These are my mod_rewrite. I tried everything. But i cant get the www.domain.com/ show WITHOUT the subdir

liefdeknopen.nl is working with not showing the subdir like it should

Code: Select all

RewriteCond %{HTTP_HOST} liefdeknopen\.nl [NC]
RewriteCond %{REQUEST_URI} !/liefdeknopen [NC]
RewriteRule (.*) /liefdeknopen/$1 [NC,QSA,L]

RewriteRule /(.*) http://liefdeknopen.nl/$1 [R=301,L]

# Rewrite sub domains.
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} !^(www\.)?liefdeknopen\.nl$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.liefdeknopen\.nl$ [NC]
RewriteRule ^(.*)$ /%2/$1 [QSA,L]


What am i doing wrong?? [/b]
badabing
 
Posts: 2
Joined: Fri Nov 07, 2008 2:54 am

Postby richardk » Fri Nov 07, 2008 11:57 am

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} ^(www\.)?liefdeknopen\.nl$ [NC]
RewriteRule ^(.*)$ /liefdeknopen/$1 [QSA,L]

RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} !^(www\.)?liefdeknopen\.nl$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.liefdeknopen\.nl$ [NC]
RewriteRule ^(.*)$ /%2/$1 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby badabing » Sun Nov 09, 2008 3:22 pm

I got it working now. Used only the first part of the script. Thanks for that.
badabing
 
Posts: 2
Joined: Fri Nov 07, 2008 2:54 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 16 guests

cron