SES and Event.BuildLink

Hi,

I'm beginner to this framework but I have to say that i'm totally
impressed!

I decided to use SES Routing System for my project. But I've a problem
and after hours and hours I couldn't solve it so far.

eg I have sites like this :

istanbul.com
newyork.com

I create dynamic pages for Google (SEO issues!) for every site like
this;

For Ex:

seo.istanbul.com
seo.newyork.com
seo.london.com

this pages lists 10 results for Google indexing with pretty URLs.

PROBLEM : I placed a loadSiteParams() method into my first handler.
This method gets subdomain by this code;

  <cfset myTLD = cgi.SERVER_NAME>
  <cfset mySubdomain = ReReplaceNoCase(myTLD, "\.\w*\w*", "", "all")>
  <cfset myTLD = ReplaceNoCase(myTLD,'#mySubdomain#.','')>

And loads all the settings from the database.(it should be per
request!) That's ok so far but....

When I enable SES; if go to seo.newyork.com all the settings are
correct i see the beautiful 'New York' banner but 'links on the
page' (event.buildlink) are still seo.istanbul.com. (until i do
fwreinit=1). When I disable SES Routing it shows correct links. I
tried preProcess interceptor (i want the separation!) but still i
couldnt solve it. Maybe i missed sth.

Thank you very much;
Onur Polat,

Hi Onur,

The ses interceptor uses the routes.cfm file to know how to create routes and links. When you use buildLink() it uses whatever you set in those files.

Therefore, the setBaseURL() is key when creating links.

Now you can override that settings if you want by overriding the sesBaseURL setting or the htmlBaseURL. http://ortus.svnrepository.com/coldbox/trac.cgi/wiki/cbSESGuide

You would really have to explain further the problem to understand what you are trying to achieve. Also, if you want to control how the buildLink() method works, I recommend you create a request context decorator and decorate it with your logic. http://ortus.svnrepository.com/coldbox/trac.cgi/wiki/cbRequestContextDecoratorGuide

Decorators seems a hard concept at first, but you will see how it easy it is.

Luis