Jump to content

RESOLVED - 404 error when viewing my own custom pages


disco_ii_disco

Recommended Posts

Hello,

I have finally upgraded to v6.

I have my own admin system which is at a url along the lines of: {STORE_URL}/my_own_admin/login.php

I get a 404 error when I try to visit it now. (I can still access it from my phone - so it is definitely there).

Would anyone know if it is best to make changes in:  seo.class.php (I have already added 'my_own_admin' to the ignored url sections) or the .htacess file - or both?

Many thanks,

Chris

Link to comment
Share on other sites

Please look at the file /includes/global.inc.php.

The values for adminFile and adminFolder may need updating.

But these values, if wrong, would affect access from anywhere - including your phone.

Link to comment
Share on other sites

I can access the normal (CubeCart's) admin system.

However,  I have an additional admin system located at a different url (e.g. {STORE_URL}/my_own_admin/login.php).

Cubecart obviously doesn't recognise the url so I'm wondering where I should let it know about it - so it doesn't send me to a 404.

Link to comment
Share on other sites

I would think that the custom script at /my_own_admin/login.php must exist and you can submit login credentials using it.

It is when the script then passes control over to... what? An index.php script, or some other admin script located somewhere?

Link to comment
Share on other sites

If the /my_own_admin/ folder is located in CubeCart's main folder, then the web server will process the .htaccess file in CubeCart's main folder. That file has a directive to show CubeCart's index.php script for 404 events. Thus, if the web server cannot actually find /my_own_admin/login.php script, you will see a standard CubeCart page (header, side panel, footer) with a 404 message as the main content. (This is different than a simple 404 response from the web server which the browser shows as a simple announcement.)

So, if you get CubeCart's standard page displayed (with a 404 advisory as the main content), then the .htaccess file is being processed, but the /my_own_admin/login.php script is not being found.

Again, that should happen regardless of what is being used to access the site.

Link to comment
Share on other sites

The reason I can probably access on my phone is because I had the my_own_admin/index.php in a browser window already on my phone before the upgrade so, after the upgrade, I opened it up - was redirected to my_own_admin/login.php , logged in and it all works.

That proves it is there but I can't get my head around how to allow it it to be displayed in any browser.

Do you think I need in a line in the htaccess file or should a correct entry in seo.class do the job?

Link to comment
Share on other sites

Once you have logged in via /my_own_admin/login.php and are working in CubeCart's admin on your phone, can we make a guess that your phone's browser, or your phone's ISP, has an aggressive cache that just might fool you into thinking that /my_own_admin/login.php does exist?

Now you mention that you were redirected to /my_own_admin/login.php. From where?

I am confident that there is nothing in the SEO class that will help with not being able to get to /my_own_admin/login.php. I assure you, if this file actually exists, we must determine why the web server (this is before CubeCart gets involved) cannot find it.

Are there any other URL rewrite directives in .htaccess found in CubeCart's main folder, or is there an .htaccess file in the folder /my_own_admin/?

Link to comment
Share on other sites

Brilliant. Found it!

Like you mentioned, it was the htaccess file in /my_own_admin/

I used this for an extra bit of security before the login page....

AuthType Basic
AuthName "Password Protected Area"
AuthUserFile /home/*****/public_html/******/.htpasswd
Require valid-user

I've removed this and I'm straight in now.

Many thanks for your help.

 

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...