Page 1 of 1
URL Problem
Posted: Wed Jan 25, 2006 3:23 am
by Phlosten
I hope this problem hasnt been covered before. I searched and couldnt find anything that fixed my issue.
I have some webspace in which I create directories in the root directory for a variety of domains. ie i have something like rootdirectory/mywebsite for my mywebsite.com domain. I setup in my web host control panel for all requests to mywebsite.com to be sent to the mywebsite directory. A pretty standard setup I would have thought.
I have now installed the CMSMS package into a new directory ie rootdirectory/cms/ and setup my domain to redirect to it ie cms.com. However there seems to be some issues regarding where the scripts are looking for certain things.
When I go to my website url (ie
www.cms.com) the website displays nicely and everything works, However if I then at the admin url (ie
www.cms.com/admin) enter my admin name and password and then click continue or whatever it is, the script tries to look at a URL with an extra directory attached. ie instead of looking at
http://www.cms.com/admin/login.php it is trying to get to http://www.cms.com
/cms/admin/login.php.
I know this is related to me having the installation residing in a subdirectory and not the root, but I cant find out where the CMSMS package is getting the directory information. I have checked the config.php file and the relative paths and website root appear correct. Is there anywhere else that I might have missed?
Re: URL Problem
Posted: Wed Jan 25, 2006 6:25 am
by Phlosten
I have just deleted the whole install and started over and it reminded me of something I had forgotten about on the previous install.
After I have copied all the files to my subdirectory I tried to visit the site which should bring up the install script. When I bring it up I get the same error I mentioned before. Basically a 404 of file not found. It is trying to find
http://www.mywebsite.com/mywebsite/install/php instead of
http://www.mywebsite.com/install/install.php.
I can see that the index.php script looks for the config.php file and is supposed to redirect to the /install/install.php script, so from my point of view this is an error unrelated to the config.php file.
Any ideas?
Re: URL Problem
Posted: Wed Jan 25, 2006 6:52 am
by Phlosten
This is an option in the domain manager of my webhost control panel. My webhost is Netfirms btw. On the domains listing there is an option to set where to forward requests to that domain. ie a specific file or a folder or another URL.
Re: URL Problem
Posted: Wed Jan 25, 2006 11:18 am
by Ted
Double check all the URLs in config.php. It's very possible that one of them is hardcoded to the wrong URL. Also, if you do end up changing any paths, make sure you clear the cache (via Site Admin->Global Settings).
Re: URL Problem
Posted: Wed Jan 25, 2006 6:53 pm
by Ted
It does a relative redirect. install/install.php
Re: URL Problem
Posted: Thu May 03, 2007 11:33 am
by superman
I'm curious if this problem was ever solved???
I'm having the EXACT same problem... I found the redirect in ../lib/misc.functions.php
Re: URL Problem
Posted: Thu May 03, 2007 4:06 pm
by Pierre M.
Hello superman,
well, I'm not sure I understand well what this "exact" same problem is. Because the first post confuses me.
Webhost domain manager redirects +/- .htaccess redirects +/- CMSms config.php tweaks... this is not a simple story.
Please tell us :
-Is there any special redirect at the registrar/DNS level ? (if yes, please explain more, with at least one example)
-What is the name of the folder in which CMSms is installed at your hosting place ? ( /cms ? /some/other/place ?)
-What is the name of the URL you want your content broadcasted ? (.com/ ? .com/cms/ ? .com/something/else/ ?)
-Have you set up pretty URLs ? (internals ? external ?)
-What is your config.php related to URL management ?
-Do you have a custom .htaccess ?
-Have you set up some other redirects ? Like meta or JavaScript...
Please provide a sample working URL, a sample non working URL.
Pierre M.
Re: URL Problem
Posted: Thu May 03, 2007 8:38 pm
by superman
Even before the install:
CMSms is intalled in ../home/www/anURL/.
Like the orgional postee said, the base URL and base root(s) in config.php seem to be correct, and "redirects" using these seem to work just fine.
It's the redirects using the actual function *redirect(somePath)* defined in /lib/misc.functions.php (which is what index.php first uses during the install).
-No special redirects at the registrar/DNS level that I know of. I have one registered domain which points to the folder named according to this domain name itself (../myURL) on my root directory on my host (../home/www)... ??
-I don't have a custom .htaccess file... only what was uploaded with CMSms.
-No custom redirects what-so-ever.
-All direct URLs to files work fine. (e.g.
www.myURL.com/admin/login.php)... and even relative redirects that use the values in config.php (e.g. from
www.myURL/admin/index.php to
www.myURL/admin/editcontent.php - which does not use the redirect function in lib/misc.functions.php that seems to be the problem).
-Two examples of redirects that don't work is:
1) (upon installation) from www.myURL.com
/index.php to www.myURL.com
/install/index.php.
2) from
www.myURL.com/admin/[b]logout.php [/b]to
www.myURL.com/admin/[b]login.php[/b]
--> *note both of these redirect without using the config.php file. The problem I suspect, is how the
redirect function (defined in lib/misc.function.php determines the server info. / base root/URL / something?? to do the redirects when called somewhere... perhpas it has to with how my host server organizes files?? (e.g. folder with my Domain Name == whats normally "pub_html" folder...??)...
...I don't know, I'm clearly a bit of newbie to all this.
Re: URL Problem
Posted: Fri May 04, 2007 2:53 pm
by Pierre M.
Well superman, you call yourself a "newbie" and you are looking inside software code.
BTW, I should number my questions next time.
But this software is
simple. If you follow the requirements and the install guide, you end up either with a working site or a list of precise warnings and errors to show to ask for help.
I don't have a custom .htaccess file... only what was uploaded with CMSms.
The CMSms distribution contains a .htaccess sample named htaccess.txt. I assuming you don't use it (you don't use external pretty URLs) and you have not renamed it.
I think your are confusing domain name and URLs. May be the source of all our questions and may be misconfiguration.
In
www.thedomain.net/some/path/to/a/page/html thedomain.net is the domain and the URL is /some/path/to/a/page/html
Upon installation, you should go straight to /install/index.php if I remember well the install guide. Until the installation is finished, /index.php is "virtually" nonsense : the software isn't installed, it can't run yet.
Try to put
absolute paths in your config.php and verify from time to time that they are stable (sometime, hosting providers "move" you from a computer to another without previous warning).
If the problem persists, please describe more your context, how you have installed, what messages you have seen, what was not matching the guide etc...
Pierre M.
Re: URL Problem
Posted: Sat May 05, 2007 2:10 am
by superman
First of all, I sincerely appreciate your response in trying to help. So thanks!
Unfortunately, I think you're denying what might really be the problem.
index.php is *not* virually nonsense before installation. It is written to redirect you (*using the redirect function I'm talking about*) to /install/index.php if it detects installation has not been completeled yet...
... similarily, there are a few other scripts that use this function to redirect (tho not many it seems). I agree - it is a rather simple, extremely user-friendly software. It's just that, for some reason, there's this small glitch in my particular case... and, altho small, it could lead to much confusion for *extremely non-technical* users who might use my system.
I don't believe I'm confusing domains and URLs. I'm quite confident the problem is *not* in the config.php file... I'll double test this claim, and try putting absolute URLs in as suggested, however.
Q: how does the php code determine from the server the my domain and previous path for relative redirects without the config.php file information??... I think this is where the problem lies.
Thanks again for your help and time.
Re: URL Problem
Posted: Sat May 05, 2007 6:20 pm
by Pierre M.
Hello superman,
superman wrote:
First of all, I sincerely appreciate your response in trying to help. So thanks!
You are welcome

Another user is angry about me in another thread.
Unfortunately, I think you're denying what might really be the problem.
index.php is *not* virually nonsense before installation. It is written to redirect you (*using the redirect function I'm talking about*) to /install/index.php if it detects installation has not been completeled yet...
As I haven't looked at the code, you must be right. I think I understand better now why you have looked at the code.
So you are saying that upon installation the first redirect /index.php -> /install/index.php isn't working. Sure there is a serious problem (bug) here. May be no need to look anywhere else.
... similarily, there are a few other scripts that use this function to redirect (tho not many it seems). I agree - it is a rather simple, extremely user-friendly software. It's just that, for some reason, there's this small glitch in my particular case... and, altho small, it could lead to much confusion for *extremely non-technical* users who might use my system.
I'm surprised because it is the first time I'm seeing such a problem reported. I agree this small glitch is too big. And I suspect it is the same as the initial redirect problem above. You should file a bug in the forge.
Could you have detected a new requirement ? Some obscure PHP config ? What about providing a phpinfo to the devs ?
I don't believe I'm confusing domains and URLs. I'm quite confident the problem is *not* in the config.php file... I'll double test this claim, and try putting absolute URLs in as suggested, however.
(Your URL.com has confused me).
Yes, if the problem is inside redirects in the PHP code, config.php can't do much.
Q: how does the php code determine from the server the my domain and previous path for relative redirects without the config.php file information??... I think this is where the problem lies.
I'm not a PHP dev so I can answer. But the devs handle the bugs in the forge.
Thanks again for your help and time.
I haven't done much.
If you know PHP, may be you can make some tests : some sample code of your own, making redirects.
If you haven't done it yet, please check the requirements (PHP version, settings...)
Pierre M.