This particular rewrite breaks the page formatting

Topics: Developer Forum, User Forum
Dec 1, 2010 at 5:32 PM
Edited Dec 1, 2010 at 5:49 PM

I have a client who serves several domains from one website space. To serve the right webpage, the system looks to the requested domain to decide what set of pages to display.

For instance:  - redirects to - rewrites to


For SEO purposes, the client would like to omit the second step, and have  - rewrite to


I'm using this rule from the documentation:


RewriteCond  %{HTTP_HOST}  ^www\.conklincarshutchinson\.com$ [OR]
RewriteCond  %{HTTP_HOST}  ^conklincarshutchinson\.com$
RewriteRule  ^/(.*)$ /index.asp?p=24&sg=vj6fxvpnixys8vkjk [I,L]


which works except that linked CSS, javascript, and images are broken:


<script src="/includeFiles/prototype.js"></script> 
<script src="/includeFiles/scriptaculous/scriptaculous.js"></script>

<link rel="stylesheet" type="text/css" href="/wStylesheets/user.css" media="ALL" />

<img src="/wimages/hutch/sprites.jpg" />


How do I rewrite the rule so that the relative links as shown continue to work?

Example images of the issue:

With the rule in place:

The page normally:



p.s. it would be very helpful if pages like

were available from a list of links the way the glossary is.


Dec 3, 2010 at 5:30 PM

Anyone? Can't believe this stumped the community...

Dec 3, 2010 at 9:29 PM

OKAY. Found the answer to this one on my own, buried deep in another post.  It needs to read like this:

RewriteCond  %{HTTP_HOST}  ^conklincarshutchinson\.com$ [OR]
RewriteCond  %{HTTP_HOST}  ^www\.conklincarshutchinson\.com$
RewriteRule  ^(/)$ /index.asp?p=24&sg=vj6fxvpnixys8vkjk [I,L]

I'm sure there's a way to do it without the OR directive, but my brain is too tired to figure it out just now.

Dec 4, 2010 at 11:54 AM

your solution is fine.

regarding your ps question, at the bottom of every page in the IIRF documentation there is a link with the text "view TOC" - View Table-of-Contents.

image of IIRF doc page

Click it and you will see the main entry page of the IIRF documentation.


Dec 17, 2010 at 5:16 PM

RE: the TOC.

That wasn't exactly what I'm after. The Table of Contents merely displays the list of articles. What I would really love to see is, for instance, an easy link to display the documentation for

RedirectRule <url-pattern> <replacement-string> [<modifiers>]

without having to click on an index item in the TOC (like Configuring IIRF), scroll through the topic to (hopefully) find a hyperlink that finally gets me to the specifics on a particular command.

Dec 17, 2010 at 5:46 PM

Ah, yes, that would be convenient.  I tried setting up fixed names like that for the help content files, but the help generator I use (Sandcastle Helpfile Builder) doesn't like it. I forget exactly what the problem was, but when I set a fixed name the helpfile links did not work, in some way.  So I let the tool generate links for me, and they turn out to be obscure GUIDs, not practically usable.