Issues with 404s on login/dashboard on subdirectory install

Permalink
Hi there,

Complete newbie to C5 and hoping that I can get some help in what I believe should be a fairly simple issue to resolve.

I host our sites at GoDaddy, and I'm generally pleased with their service. I'm aware with grizzles on here about them, but would hope that we can put that to one side here.

We have a top level domain that's the "master domain" and then a number of other domains that we map to the subdirectories of the root for the master domain. I don't wish to give away the domains for now, but let's say it's along these lines:

ROOT - foobar.tv

SUBDIR1 - subdir1.com, subdir1.net

SUBDIR2 - subdir2.com subdir2.fr

In the Godaddy control panel, we assign the subdir1.com domain with the SUBDIR1 directory etc. All works well in the past.

Initially, I installed C5 to a subdir of SUBDIR1, let's refer to that as "c5dir". Took forever to realise that the only way that we could get C5 to install was not to try and access the index.php throughhttp://www.subdir1.com/c5dir/index.php... but instead we needed to use the master domain address -http://www.foobar.tv/SUBDIR1/c5dir/index.php...

Having done that, the site installed with Elemental as planned but the URLs within the site were all a little screwy (with pretty URLs both on and off).

Tried various different approaches and then settled on installing it into root, and then moving it down two levels, so that the URLs were all based on the topleveldomain that we've assigned to c5dir. Having done that, the basic C5 site now works as it should, and I have pretty URLs turned on too.

Now, the problems become profound if I try and log in. If I use the login link, which shows as:

http://www.sparedomain.com/index.php/login... and not, as all of the other links are (e.g. the navigation bar along the top), ashttp://www.sparedomain.com/login...

Having gone tohttp://www.sparedomain.com/index.php/login... that link returns a 404.

If I manually enter thehttp://www.sparedomain.com/login... link, then it presents the login form correctly, but the login process fails and I am sent to:

http://sparedomain.com/index.php/login/authenticate/concrete...

Which resolves as an ugly 404 page with no CSS/styles being pulled in.

However, if I go to:

http://www.foobar.tv/SUBDIR1/c5dir/index.php/login... and log in, then I get logged in and see the site as I should.

To further muddy the waters, if I then go to the dashboard button in the top right (showing ashttp://www.foobar.tv/SUBDIR1/c5dir/index.php/dashboard)... then, although the dashboard comes up, if I click on any of the links (e.g. "Sitemap" which shows in my status bar as beinghttp://foobar.tv/SUBDOMAIN1/c5dir/dashboard/sitemap)... then I click on that and get another 404 again! However, if I modify that manually to behttp://foobar.tv/SUBDOMAIN1/c5dir/index.php/dashboard/sitemap,... then I go to the correct part of the dashboard and functionality is as expected.

So I am falteringly getting there, but clearly I don't want to hand correct every dashboard link!

I am hoping that this is pretty simple to sort out. I am slightly baffled as to why some links when I initially installed were hard-wired to the sub-directory of the master domain, instead of just using relative directory paths. Hence finally installing at root to avoid this.

The thing I am struggling with is why the dashboard links need the "index.php" manually added in, and why the authentication fails if I use thehttp://www.sparedomain.com/index.php/login... or even justhttp://www.sparedomain.com/login...

Happy to answer questions as they arise. Hear wonderful things about C5 but lost half the weekend trying to get over what I'd hoped would be simple installation issues.

DataMonkey101
 
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
Can you post the contents of your subdir1 .htaccess file, specifically the 'concrete5 urls' section.
DataMonkey101 replied on at Permalink Reply
DataMonkey101
This is my .htaccess file at the root of the install:

# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
# -- concrete5 urls end --


We seem to have lost my original reply/replies as a result of the Concrete5 team addressing some spamming issues over recent days. Initially, someone suggested that I change the "ReWriteBase" line to include the "SUBDOMAIN1/c5dir", but as I explained, the site is now showing successfully athttp://www.sparedomain.com, so the pages should all work as if the install was done in an ordinary root.

My issues, to summarise are that:

1. The site to the outside world looks and functions as it should.
2. The "log in" link does not take you to the login page, buthttp://www.foobar.tv/login does, although logging in there does not get authenticated!
3. I can login using the wholehttp://www.foobar.tv/SUBDOMAIN1/c5dir/index.php/login,... but thereafter, the links that are in the dashboard do not get processed as they should, leaving me to manually add in "index.php/" where I need to.

Now, despite installing this at the root level, there seems to be some odd stuff in terms of certain links being hard coded with directory names on install, as opposed to everything being relative links within the site (hence installing at root and moving the whole site down).

It seems as if I need to set a "Base URL" somewhere for everything to work on the system/dashboard side of things, along with possibly modifying the .htaccess file.

Any help appreciated here! Hopefully the spammers won't get rid of this new post too.