How do I reach admin path via server virtual path?
Hi there -
Is there a way of reaching the admin panel without it redirecting to the full domain name for the site?
For example,
http://host.somesuchhost.com/~somesite/store/admin/
I am trying to troubleshoot a client template issue on our php 5 server, while temporarily having moved their site to another server where the domain currently resolves to.
Any time I try to access the admin on the first server, it is redirecting to the full website path with the domain name.
Any way for me to work around that?
Thanks.
Mike
Re: How do I reach admin path via server virtual path?
If you're moving the site to another server, here is the process to follow to automatically build the correct paths in the configuration settings: https://www.zen-cart.com/tutorials/i...hp?article=100
Re: How do I reach admin path via server virtual path?
Quote:
Originally Posted by
DrByte
Thanks for the response - however, this is not quite what is being done here, so it doesn't actually solve my issue.
The site was on our php 5 server. It had problems due to compatibility issue with a third-party template, so we moved the client's site to a php 4 server as an interim measure.
It is working perfectly there.
In troubleshooting the copy of the site that still exists on the php 5 server, we can use the server paths to access the site itself and reproduce the errors.
We also want to access the admin panel on the copy of the site on the php5 server. However, when we use the server path, it redirects to the actual domain name path.
So, on the live server, we have -
www.domain.com/store
Let's call the other the test server -
On the test server, we have -
host.hostname.com/~user/store <- this works fine
If I look to access the admin panel on the test server -
host.hostname.com/~user/store/admin ... this redirects back to the domain name, so it redirects to -
www.domain.com/store/admin ... which works fine, but is hosted on the live server, which is not where I want to access.
If actual details would be more helpful, I can PM them to you.
Thanks.
Mike
Re: How do I reach admin path via server virtual path?
So, to make the storefront work on the other server, you had to edit the /includes/configure.php file, right?
You'll need to make similar edits to the /admin/includes/configure.php file if you want the admin to work too.
The FAQ article simply documents the "easiest" approach to auto-generating the correct contents of the configure.php files for the server you're running from.
Re: How do I reach admin path via server virtual path?
Quote:
Originally Posted by
DrByte
So, to make the storefront work on the other server, you had to edit the /includes/configure.php file, right?
You'll need to make similar edits to the /admin/includes/configure.php file if you want the admin to work too.
The FAQ article simply documents the "easiest" approach to auto-generating the correct contents of the configure.php files for the server you're running from.
No, again, that's not the issue.
When moving the site, all I do was a cpanel transfer between servers. It is transparent. No paths are changing - everything is precisely the same.
If you're telling me that admin.php automatically redirects to paths found in the configuration file, then I can simply go an modify the config file directly. However, since I can access the site itself without any modification to /includes/configure.php, I would not expect to need to modify the config to access the admin panel - unless it's coded this way for security purposes.
mrk
Re: How do I reach admin path via server virtual path?
Quote:
When moving the site, all I do was a cpanel transfer between servers. It is transparent. No paths are changing - everything is precisely the same.
On a different server, the domain name will not be accessible unless the nameservers for the domain are altered....
You can do this by assigning a dedicated IP to the test account and using this IP in place of the domain name in both configure.php files....you virtual and actual paths will not need to be altered
Re: How do I reach admin path via server virtual path?
Okay, my question has been entirely misunderstood.
A site doesn't work on Server A. It's been moved to Server B.
The nameservers were changed, they resolve - all is well.
The site works perfectly on Server B.
I am in the interim troubleshooting the issues with this site on server A. Since the domain name now resolves to server B, I can access everything via the server's virtual path as outlined in the previous emails. This works fine for everything other than the admin.
However, the last post led me in the right direction.
I needed to update the path in the admin config file so it uses the virtual server path and not the domain name path.
I needed to update this line -
define('HTTP_SERVER', 'http://host.hostname.com/~user/'); and replace the domain name with the path to the server.
It now does exactly what I need for troubleshooting purposes.
Thanks.
Mike