Page 1 of 1

needing a bit of help with a script installation

Posted: Fri Aug 06, 2010 8:54 pm
by zbdblues
Hi everyone! Ok, so i have two websites one is on a subdomain and the other is a folder in the sub domain. The second script can share the database of the first to produce a single log in but i'm having trouble with the instructions.
The instructions give examples depending on the set up and i need to follow example two, but i don't know how to write the info required.
In example one, it's simple to give the info required:
Example 1 - using absolute URLs, suitable if:

* Your site: http://sub.mysite.com/
* Your login page: http://www.mysite.com/login
* Your register page: http://www.mysite.com/register
* Your logout page: http://www.mysite.com/logout

return array(
'login' => 'http://www.mysite.com/login',
'register' => 'http://www.mysite.com/register',
'logout' => 'http://www.mysite.com/logout',

So in this example i would write it as:
return array(
'login' => 'http://www.profiles.com/login',
'register' => 'http://www.profiles.com/register',
'logout' => 'http://www.profiles.com/logout',
Assuming my site name was http://www.profiles.com

Now i need to use example two, but do not know how to write it:
Example 2 - using relative URLs, suitable if:

* Your site: http://www.mysite.com/site/
* Your login page: http://www.mysite.com/login.php
* Your register page: http://www.mysite.com/register.php
* Your logout page: http://www.mysite.com/logout.php

return array(
'login' => $relative_url_prefix.'../login.php',
'register' => $relative_url_prefix.'../register.php',
'logout' => $relative_url_prefix.'../logout.php',

So basically i have to edit the 3 lines login, register and logout.
Now how would i do that? Would i write:
'login' => $www.profiles.com'../login.php ?????
'register' => $www.profiles.com'../register.php
'logout' => $www.profiles'../logout.php', ????

You see in example one, i would simply write the url, but example two is asking for relative url, even if i knew what that meant, how do write it?
Say for example my login page is http://www.sub.profiles.com/login
How do i write that in to this:
return array(
'login' => $relative_url_prefix.'../login.php',

Your help would very much be appreciated, thanks.

Re: needing a bit of help with a script installation

Posted: Fri Aug 06, 2010 10:44 pm
by requinix
Is $relative_url_prefix defined somewhere? For you it would probably be "/site/".

You haven't mentioned what the URLs are supposed to be (and the question is how to put them in the code), so I'm guessing

Code: Select all

'login' => '/login.php',
'register' => '/register.php',
'logout' => '/logout.php',
Example 2 is written as if you had the site at /a/b/c and the three pages were one level above that (ie, /a/b/login.php, /a/b/register.php, and /a/b/logout.php). What I gave is for putting the site anywhere you want on the same domain, and having the three pages at the root of that domain. Probably.

If that's not it then (a) what is the actual path to the "site", and (b) what is the actual path to the login/register/logout pages?