Permalinks - Absolute URLs and Good Practise

By Perchpole - August 8, 2013

Hello, All -

I've managed to get Permalinks working fairly well and I'm increasingly pleased with the results. There are a couple of caveats, however, most notably the need to use absolute URLs almost everywhere. This is a bit of a pain as most web design work encourages the use of relative URLs. However I'm perfectly happy to employ a different strategy. I just wondered what would be the best way of going about things?

All I need to do is drop in a piece of code before each URL. For example, typically I would reference a CSS file along the lines of:

href="css/style.css"

I could change that to:

href="<?php echo $mySettings['siteURL'] ?>/css/style.css"

or even:

href="<?php echo $_SERVER['HTTP_HOST'] ?>/css/style.css"

or perhaps there's a CMSB "super global"  I could use....?

In any event, which method would be best?

:0)

Perch