at 07 May 2012
Many thanks for your help.
With your suggestion I have been able to configure the CMS so as to publish the static pages to the web server and dynamic pages to the Delivery server.
I am now stuck with just one issue. As you mentioned in your post, currently I have configured for the delivery server pages to get published as /dynamic/ and all the web server pages are getting published to root. Everything works fine with the rewrite rules taking care of taking the user from one page to another.
However, I would like to publish the web server pages to separate folder structure depending on the section of the static page. Publishing is not a problem and I am able to publish the pages to separate folders using publication folders.
But, when I do this, the delivery server pages still have the references to the webserver pages relative to the root and I am unable to add the specific folder name to these references.
Any ideas how I can achieve this?
at 06 Apr 2012
If these are changing it sounds like you may have an on publish event or on load event set in Publication Structure or the Delivery Server project. You can find these under Rules>Administer Event Definitions.
These events do post publish transformation of the content. In your case it sounds like would rewrite the ds content to cause your blockage. If the rewrite script in DS doesn't ignore the files that by convention (path or extension) should be served else where it will keep the /cps prefixing.
You can remove the CPS prefixing in publication configuration in Management Server (this may let you turn off the event altogether. This is defined in the publication structure configuration (a sample).
Hope this helps. Pretty sure these are topics covered in OT Learning Services Project Builder courses if you get a chance to attend those.
at 06 Apr 2012
Tim, thanks for your detailed explanation.
"With the virtual directory thought in mind if you think about your problem of publishing interlinking. Interlinking on the same web server becomes trivial. If you publication has / as the relative prefix for all static pages. All DS pages will be published with /xyz.ext links. Since the web server is the same it links with no issue. Conversley when you republish all the static content it will have links to DS content of /dynamic/abc.ext which again with the correct rewrites will resolve fine."
I am mainly confused about the above highlighted point. As I understand when I publish pages to the delivery server, all page references within that page will have the form "/cps/rde/xchg/solex_production/default.xsl/XXXX.htm" (XXXX = page id / name) which is the cause of the problem. If this XXXX page is located on the web server, this URL will never lead to the web server page.
Is there a way to publish pages from CMS to Delivery server and still have page references as /xyz.ext??
Apologies if I have misunderstood your meaning, I am still learning CMS and DS :)
at 05 Apr 2012
Another approach if you don't want to adjust your extensions is directory based and works well with WSM publication. I prefer doing at most 1 level of virtual directories but you can do more. DS files are served in a separate virtual directory created by rewriting from the Web Server served files you can use a rewrite technique similar to what Stu proposed plus settings on your DS publication folders to
Web Server / (root)
With the virtual directory thought in mind if you think about your problem of publishing interlinking. Interlinking on the same web server becomes trivial. If you publication has / as the relative prefix for all static pages. All DS pages will be published with /xyz.ext links. Since the web server is the same it links with no issue. Conversley when you republish all the static content it will have links to DS content of /dynamic/abc.ext which again with the correct rewrites will resolve fine.
If you were only worried about DS pages/dynaments that forward to /cps/* URLs you will either need to update the code to be aware of the rewrites or allow /cps/* to be reachable via the web server. If these pages are published from Management Server they should have the relative paths to static content and their navigation and editorial links would point back to the /dynamic/ virtual directory in this scenario. It would only be the in code logic that would force you to the /cps/* pathing. Although it is not ideal for the user its possible and safe. You may want to adjust robots.txt to keep things from crawling /cps/* urls in this case as well.
Apache has mod_rewrite, IIS 7 (iis.net) has 2 modules ARR and rewrite, Helicon beyond ISAPI Rewrite 3 has APE are also other rewrite solutions (Stu mentioned some of these). The Apache and IIS 7 are ones my services team has used on a number of clients, as well as ISAPI Rewrite 3 and 2.
at 05 Apr 2012
My delivery server knowledge is a bit limited, but we don't actually publish to Delivery Server in these instances.
We publish to a single web server instance for all pages, then we have a User Defined Job that runs on the end of any publishing jobs that sends the pages to Delivery Server.
http://webserver:8080/cps/rde/imptask/import?txLogin=<username>&txPassword=<password>&pfs.noninteractive=yes&project=<delivery server project name>&taskID=ImportFromWebserver
at 05 Apr 2012
Stu, thanks for your response.
ReWrite Proxy will take care of redirecting the user from the main static website to the delivery server pages. We also were thinking on the same lines so thanks for the confirmation.
My bigger problem is how to maintain the URL references on the delivery server page instances to point to the main static website? Since when I publish the content from the CMS, all URL references are generated wrt to the publishing target, all links within the Delivery Server pages will have links pointing to within the delivery server itself. Is there a work around for this?
at 05 Apr 2012
The solution we usually use is a ReWriteProxy on the main static website to rewrite identifiable pages in the main site to the delivery server equivalent on the Delivery Server site.
In our instance, since we use asp and aspx pages as our base page type only, Deliver Server pages are written out as .html files so if the sites sees a .html file, its proxied over to the Delivery Server instance of that page.
RewriteProxy (.*).html(.*) http\://localhost\:8080/cps/rde/xchg/xxxxx/xsl/root.xsl/-/html/$1.html$2 [I,U,A]
If you are running IIS7 then you will need to either work out the equivalent Rewrite rule, or use IsapiRewrite 3. Older versions of IIS will have to use a tool such as IsapiRewrite.