Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4270612
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:19:48+00:00 2026-05-21T07:19:48+00:00

My login redirect is being built with an absolute url but I need to

  • 0

My login redirect is being built with an absolute url but I need to use a relative url because my cakephp application is being served up through a proxy server.

The Router class has properties that effect the behavior of the url method (documentation link:
http://api.cakephp.org/class/router#method-Routerurl )

I think what I want to do is set the ‘base’ property to false, but I’m not exactly sure how to do this. Do I just specify

$this->base = false;

somewhere? (I tried doing this in the beforeFilter in the controller but it had no effect).

Update: Well, it’s not the ideal solution but I can get the links to work through the proxy server by adding this line to paths.php:
define(‘FULL_BASE_URL’,’http://www.myexternaldomain.com’);

and then I also had to set the security level to low in core.php.

But then this means that went I access the cake pages locally with
http://localhostname/cake/users

I’ll get redirected to the external url which is not what I would prefer.

Update:

Here is the output of a print_r($_SERVER) from my dev server:

Array ( [REDIRECT_REDIRECT_STATUS] => 200 [REDIRECT_STATUS] => 200 [HTTP_HOST] => devdataload [HTTP_USER_AGENT] => Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.11) Gecko/20101028 CentOS/3.6-2.el5.centos Firefox/3.6.11 [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5 [HTTP_ACCEPT_ENCODING] => gzip,deflate [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7 [HTTP_KEEP_ALIVE] => 115 [HTTP_CONNECTION] => keep-alive [HTTP_REFERER] => http://devdataload/cakepf/users/login [HTTP_COOKIE] => CAKEPHP=ndhjfch0c1oq285ks4d2dfib90; ZDEDebuggerPresent=php,phtml,php3 [PATH] => /usr/bin:/bin [SERVER_SIGNATURE] =>
Apache/2.2.8 (CentOS) Server at devdataload Port 80
[SERVER_SOFTWARE] => Apache/2.2.8 (CentOS) [SERVER_NAME] => devdataload [SERVER_ADDR] => 5.213.249.197 [SERVER_PORT] => 80 [REMOTE_ADDR] => 5.213.249.197 [DOCUMENT_ROOT] => /var/www/html [SERVER_ADMIN] => root@localhost [SCRIPT_FILENAME] => /var/www/html/cakepf/app/webroot/index.php [REMOTE_PORT] => 39979 [REDIRECT_QUERY_STRING] => url=alerts [REDIRECT_URL] => /cakepf/app/webroot/alerts [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => url=alerts [REQUEST_URI] => /cakepf/alerts [SCRIPT_NAME] => /cakepf/app/webroot/index.php [PHP_SELF] => /cakepf/app/webroot/index.php [REQUEST_TIME] => 1299347553

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T07:19:49+00:00Added an answer on May 21, 2026 at 7:19 am

    This solution isn’t ideal but at least it’s functional. In my production system I add this line into paths.php:

    define('FULL_BASE_URL','http://<proxy server name>');
    

    This ensures that all urls go through the proxy server.

    In dev/test where I am only working locally, I comment that line out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What we need: redirect to each user's specific page after their login. What we
The ViewExpiredException is being handled by a redirect to the login screen. The problem
I have the following rule in my current .htaccess file to redirect /videos/login/ requests
This question is related to my other question How to redirect to Login page
I would like to redirect visitors to a login page with added parameters (based
I found many way for redirect to previous page after login and example :
If registered user jumps to login.jsp I wish to redirect him to youAreLoggedIn.jsp .
Basically, I currently have login/ in urls.py redirect to the django.contrib.auth.views.login and that seems
I'm having an issue where after logging out, I redirect to my site's login
I am working on a web application which requires the user to login before

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.