<?php return '<a href="http://'.$_SERVER['HTTP_HOST'].'/">[(site_name)]</a>'; ?>
The goal isn’t to get index.htm, that is happening.
The goal is to get mydomain.com for links to the home page. If this was being hardcoded, then you would just link to http://mydomain.com or simply to / without the index.htm reference.
mods: by all means, feel free to move to a more appropriate thread if need be.
That tilda is completely normal on linux/unix machines - it indicates that they’re probably using Apache’s mod_userdir and have placed your content in /home/clientname/public_html.
However, friendly URLs won’t work until the real domain name is used for the URL. Or if they can be used with the temporary URL like that, I’ve never figured out how.
They should, yes.
Btw, I’ve got friendly URLs working just fine on two machines - one is my main site, one is a mirror and they have different domain names. The rewrite rules don’t look at the domain name to do anything, so it shouldn’t matter where your site is hosted. There may be a MODx setting or something in your template that looks for the URL (like a base href), but you should be able to change them so that the domain name is never referred to. In fact, it is wise to avoid hard coding a domain name precisely for this reason.
This discussion is closed to further replies. Keep calm and carry on.