Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
"http://domain.com/subdirectory" vs "http://subdomain.domain.com"
This discussion has been closed.
Comments
pathurl, the domain name is not used. But all the paths are relative to the web root.'/subdirectory/themes/vanilla/styles/default/vanilla.css' is a relative
pathurl;'themes/vanilla/styles/default/vanilla.css' is a relative
pathurl;'http://domain.com/subdirectory/themes/vanilla/styles/default/vanilla.css' is an absolute
pathurl;The second one is to avoid because it doesn't work very well with friendly urls.
The problem
in your casein some case when changing the location of the forum is that vanilla save in the database '/subdirectory/themes/vanilla/styles/default/' when it would be better to have 'themes/vanilla/styles/default/' and build the url like vanilla do for other urls$StylePath = $Context->StyleUrl; $StylePath = ereg_replace("^".$Context->Configuration['WEB_ROOT'], '', $StylePath); $Head->AddStyleSheet($StylePath.'vanilla.css', 'screen', 100, '~'); $Head->AddStyleSheet($StylePath.'vanilla.print.css', 'print', 101, '~');
www.domain.com/subdirectory/
which is aliased to:
subdomain.domain.com
The relative path to the initial installation would be
/subdirectory/
which the alias setup is feeding out based on the initial install which is relative to the theme and style location. This doesn't work because of that reason as Vanilla doesn't really support duality in this manner. It's either going to be one or the other but not both.if this was set up as either two different subdomains or two different top level domains within a subdirectory of the same name, it could work. Although there would then be a cookie issue to contend with as Vanilla would have to Validate against one primary setup.
He said:
> "...vanilla save[s] in the database '/subdirectory/themes/vanilla/styles/default/' when
> it would be better to have 'themes/vanilla/styles/default/' and build the url like vanilla
> do for other urls."
YES!!! Exactly! There is nor reason at all for vanilla to have "/subdirectory/" in any path or URL,
as all URLs can be treated as relative to the location of index.php, just as one would in
straight html hrefs.
He later said:
>> I thought there was only a problem with the style related urls.
That's all it is - the information shows up, but it shows up as a single html page,
without the frames and css treatment. Form what I can see, the only problem
here is picking up the "style" stuff, as the links "work" and information shows
up just fine, but is unformatted.
So, I think the problem here is that vanilla attempts to store (and use) the URL
information "above" the location of index.php, and this is what confuses
(some say it "breaks") things.
If there is some valid need to know the URL to index.php, this sounds
to melike an excellent thing to put in the config files, so that relocation
of discussion groups would require a backup, a restore, and an FTP of
one file with one changed value.
But there is no need for any code to "build" the URL.
Let the servers and browsers handle the URLs, as
they do a fine job without any help from applcation
code.
The use of cookies that reference a URL subdirectory is, ummm... strange.
Yes, something unique is needed for multi-discussion-group sites,
but how 'bout the assigned name of the group, rather than something
that depends upon physical location or URLs?
But don't get me wrong, vanilla is very nice and clean.
From this page - /community/discussion/6423/httpdomaincomsubdirectory-vs-httpsubdomaindomaincom/-
index.php or discussions/ mean /community/discussion/6423/httpdomaincomsubdirectory-vs-httpsubdomaindomaincom/discussions/
That's why we need to use links url with the base url like /community/discussions/