This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Emulating host-header-based virtual sites
Author
Message |
wwinfosp
Newbie


Joined: 08 January 2012
Posts: 2
Posted: 08 January 2012 at 12:43pm

Hello I have 2 domininios site1.com.br site2.com.br and want direct (emulate) to a folder on my hosting, I used the example did not work and the images and css does not load

RewriteEngine on

#Fix missing trailing slash char on folders
RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]

#Emulate site1
RewriteCond %{HTTP:Host} ^(?:www\.)?site1\.com$
RewriteRule (.*) /site1$1 [NC,L,NS]

#Emulate site2
RewriteCond %{HTTP:Host} ^(?:www\.)?site2\.com$
RewriteRule (.*) /site2$1 [NC,L,NS]

Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 10 January 2012 at 7:22am

What type of links do you have for css and images? relative? absolute? root-relative?

Regards
Andrew
Back to Top
 
wwinfosp
Newbie


Joined: 08 January 2012
Posts: 2
Posted: 10 January 2012 at 2:36pm

Hello Andrew I am trying to emulate the BlogEngine.net v. 2.5 in this folder, I found another example where loads the images / css google index but wrong.

# Turn on rewrites.
RewriteEngine on
# Only apply to URLs on this domain
RewriteCond %{HTTP_HOST} ^(www.)?site1.com$
# Only apply to URLs that aren't already under folder.
RewriteCond %{REQUEST_URI} !^/folder/
# Don't apply to URLs that go to existing files or folders.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all those to insert /folder.
RewriteRule ^(.*)$ /folder/$1
# Also redirect the root folder.
RewriteCond %{HTTP_HOST} ^(www.)?site1.com$
RewriteRule ^(/)?$ folder/default.aspx [L]
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 11 January 2012 at 7:43am

Please, provide the rewrite.log for the testing request.
Logging issues described in FAQ

Regards
Andrew
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version