Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Website URL on setting page...
#1
It is not a good idea to use this everywhere for hotlinking.
Here are a couple of scenarios why:

1) Let's say you set up a temporary domain for creating a new site... new.mysite.com
Now after youve built your site all of the embedded images and so forth have been embedded with src='http://new.mysite.com/...' which will fail to work correctly after you move it to www.mysite.com. Changing the url on the settings page doesn't fix it because youve embedded all the images with the location of the development site.

2) Let's say you own two domains mydomain.com and mydomain.net and you want both to appear as if they are on those paths (no redirection). Again you have the same problem for the same reason.

In 3.0 it was a recommendation to enter your URL, but I always entered '/' because it was the better way to reference evrything with regards to those two scenarios. IN the new 3.1 it is A REQUIREMENT to enter a URL. I am NOT going to do that. I think I might have to revert back to 3.0. The actual domain that you are installed on can be determined anytime in php with $_SERVER['HTTP_HOST']. It can always be canonicalized from apache or your web server software. It shouldn't really be a user configurable setting.

If I want to remove the restriction of this being a URL as it was in 3.0 what do I need to change?
Reply
#2
Edit admin/settings.php, and in line 204 search for:

Code:
type="url"

and change it to:

Code:
type="text"
Reply
#3
Excellent! That's what I wanted. Thanks Carlos.
Reply
#4
I had a similar problem where I had developed on a www2 domain. I ended up using grep and sed for a domain of 93 pages. It took around a half a second to rewrite all of the .XML. I posted my fix at http://nwlinux.com/fix-get-simple-cms-ur...ew-domain/
Mark Moore
http://nwlinux.com
Reply




Users browsing this thread: 1 Guest(s)