Hi Jonathan,

Thanks for your response.

I am sorry for not sharing the URLs. The one in my signature is our portal
which we have been trying to deliver using CDN.

We are using Genshi Templates. 

We would inspect the template for rendering issues.

Also, We are facing issue with redirect. I had already mentioned the flow in
one of my earlier mails:

1.      The portal is hosted at ip address IPp (lets say).
2.      I create a DNS entry -  cdn.example.com with ip as IPp.
3.      I configure cdn.example.com in CDN which provides a URL.
4.      I add the CDN URL as CNAME in DNS for www.example.com

When I create a URL (using url_for) in the above configuration, the URL is
getting created with cdn.example.com as the hostname whereas the desired one
would obviously be www.example.com. This URL is getting assigned to location
header for redirect and hence, the issue arises.

This is the reason I asked about the method of URL creation in Routes. Where
does it pick up the hostname from? How can I make the URL point to CDN? Etc.

Would be really helpful if you could provide some pointers...

Thanks,
Pinakee Biswas
Director & CTO 



FE- Mail: [email protected] I IWeb: http://www.vvidiacom.com 



-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jonathan Vanasco
Sent: 15 April 2013 20:22
To: pylons-discuss
Subject: Re: URL generation in Pylons

You've been posting a lot of issues regarding your site and CDN. You didn't
answer my question about sharing code or a url, so I tried the one in your
signature

Looking at the HTML for http://www.vvidiacom.com/web , I see a lot of
templating code that was not executed:

Here are some examples:

    <form name="loginForm" action="${h.url_for('/login/
submit',came_from=request.url,__logins='0')}"  method="post" >

    <img src="${proxy_prefix}/appearance/logo.gif"/>

    <py:if test="h.is_loggedin() == 1" py:with="user_email =
h.get_useremail(); logged_in_user =
request.environ['repoze.who.identity']['user'];">
        Welcome ${user_email} | <a href="${h.url_for(controller='/ users',
action='edit', id=logged_in_user.user_id)}">My Account</a> | <a
href="${h.url_for(controller='/login', action='logout_handler')}"
id="logout">Logout</a>
     </py:if>

The third block suggests you're writing in the Genshi templating language.

I'd suggest you inspect how your templating is set up -- and routinely check
the HTML being generated.  Your templates are very obviously not being
parsed and either being served as static files or the rendering facility
just doesn't know what to do.

--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to