views:

15

answers:

1

For a pretty complex website we are looking on how we can best create internal links between pages without creating complex logic to calculate the url for the target pages when rendering the page.

For example if we wanted to link to www.domain.com/nl/holiday/hotels/holiday-inn/ we are thinking to put an intermediate linkthrough page between the two. Something like www.domain.com/go/hotel/234 which would just calculate the correct url path and forward to the target url. This prevents us from needing to do all the translations and slug calculations on the page that is being rendered which saves us quite some resources and trouble.

Does this technique have some drawbacks that we need to be aware of? From both technical and SEO view?

+1  A: 

It really shouldn't be that resource intensive to calculate some slugs. If it is, you may want to think about how your queries and code work and see if you can refactor them in some way. But even if you had a few extra queries a page, it wouldn't slow down your pageload time by any real noticeable amount.

I don't think it's a good idea to have an intermediate page either. If you were setting a redirect header, it certainly wouldn't help your SEO, and neither would making your users wait an extra couple of seconds every time they want to open a page.

Find a way to cheaply generate your slugs, don't use an intermediate page.

Sam152
Good point, we are actually in the planning stage atm so changing the calculation of slugs and url pointers is certainly an option! Thanks
ChrisR
Yeah, I'd suggest storing all the data you need to generate a slug, with the ID that you use when generating "www.domain.com/go/hotel/234". It'd probbably not cost you anything in terms of preformance.
Sam152