Search

I need a {$parameter} that outputs my domain with extension (domain.com) wether it is installed on a local developmentserver (dev.domain.com) or live (www.domain.com, or domain.com) However since it is used in a dynamic datasource as an attribute, I cannot test for a contain, or anything fancy like that. So i figured I could just use substring-after($root,'.'). But this only works if the www is included.

So reading thispost; I started wondering what the best practice is?

Considering seo (301 link redirects), what do we think?

The default way symphony sets rooturl in the config file is without www? (though I have some 2.0 installs with www)

Regarding the Symphony "default", there is none. Symphony 2 used to default to the domain which you accessed upon installation. This means: If you installed it using http://domain.com/install.php, Symphony would write domain.com in the config file.

From Symphony 2.0.2, the domain name has gone completely from the config file, so Symphony is performing some sort auf auto-detection to generate e.g. the $root parameter.

This solution gives you complete freedom to use any domain you want and define domain rewriting in your .htaccess file.

Formerly Symphony was performing strong redirects to the "domain". I was a bit irritated when Symphony stopped those strong redirects, but with the domain name having vanished from the config file, it all makes perfect sense to me. I love it.

Best practice regarding "www" often seems a matter of taste to me. But we should keep in mind that in big organisations, there will often be an internal domain name in the computer network (being the same as the website name). In these cases you must use "www" for the website (making clear that this is the "www" part of the domain).

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details