ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Password Reset URL with System folder above root

December 12, 2012 8:43pm

Subscribe [1]
  • #1 / Dec 12, 2012 8:43pm

    mvdesign

    2 posts

    I have my system folder located above the site root for security reasons. I’ve updated my webroot admin.php and index.php files so the

    $system_path = '../newsystem';

    Everything works fine so far, except for the link that gets sent in the email generated when a user tries to reset their password. That link seems to assume that the system folder is inside the webroot. The link I get looks like:

    <a href="http://example.com/newsystem/index.php?D=cp&C=login&M=reset_password&id=2zu5k4Yj">http://example.com/newsystem/index.php?D=cp&C=login&M=reset_password&id=2zu5k4Yj</a>

    I’ve messed with the URL a bit, and a link that seems to do the trick is:

    <a href="http://example.com/admin.php?D=cp&C=login&M=reset_password&id=2zu5k4Yj">http://example.com/admin.php?D=cp&C=login&M=reset_password&id=2zu5k4Yj</a>

    Ultimately, my questions are: How can I fix these emails so that they send out a properly constructed link? Or how can I intercept the poorly constructed link and send it to the right place? Is this something that needs to happen in the config somewhere? In .htaccess? Is there another setting somewhere that I missed?

  • #2 / Dec 17, 2012 2:09pm

    mvdesign

    2 posts

    With help from the fancy new support system, I was able to track down the issue. I had the following in my config.php:

    $config['cp_url'] = $config['base_url'] . $system_folder . "/index.php";

    Updated it to:

    $config['cp_url'] = $config['base_url'] . "admin.php";

    Works as expected.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases