Rewriting, relative paths and themes

G

Guest

I have a problem that I can see the reason for but cannot figure out a
solution.

I am using a simple URL rewriter to map www.me.com/1/2/3/4/product.aspx to
www.me.com/product?filter=1/2/3/4 to make my site Google-friendly. The site
dynamically adopts the correct master pages and themes according to a host
header-based query in SQL 2005 and via a custom sqlsitemapdatasource
automagically configures a breadcrumb and menus, all of which work
wonderfully.
However the theme's stylesheet is always declared in the page as a relative
reference (e.g. "Themes/me.com/stylesheet.css") which means that for the
rewritten rule the browser client will be looking for
"www.me.com/1/2/3/4/Themes/me.com/stylesheet.css". Does anybody have a way
of specifying that this be output as a url relative to root
("~/blah/blah/...") as I don't want to have to do a replace on render because
of the hit per page that would incur.

Ta!!
 
S

Stefano

Hi,

I think the only way to solve this problem is to put the reference to the
css as absolute url:
"/Themes/me.com/stylesheet.css"

When you insert a "/" as the first character, the browser always points to
the root of the site.

HTH

Bye,
Stefano
 
G

Guest

Hi there

Yes that would be the solution but the stylesheet reference is inserted
directly by the Theming process & I have no opportunity to specify it as a
root reference or otherwise! Unless I'm going completely mad, that is, but
thank you for the suggestion.

Anybody got any ideas how to hook into the theme process?

Cheers again!!
 
G

Guest

Graham said:
Hi there

Yes that would be the solution but the stylesheet reference is inserted
directly by the Theming process & I have no opportunity to specify it as a
root reference or otherwise! Unless I'm going completely mad, that is, but
thank you for the suggestion.

Anybody got any ideas how to hook into the theme process?

Cheers again!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top