when i hit my login button i redirected to my live url
where have you set your live url? ensure you have updated the appropriate .env and clear caches.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am currently working on one codeigniter project and i've setup it in my local machine . I have mac and using nginx for web server so the problem is i have setup my CI project locally .. and also i have made an entry for nginx localhost entry
server {
listen 80;
server_name dine.localhost;
index index.php index.html index.htm;
root /var/www/resort/index.php;
#access_log logs/host.access.log main;
location / {
try_files $uri $uri/ /index.php?$args;
}
location /ws/ {
try_files $uri $uri/ /ws/index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
now the best part is i am able to locally get that login page but when i hit my login button i redirected to my live url and I know the reason as in my config i have setup my live url in $config['base_url'] path But the problem is when i remove that base url my localhost CI project does not run properly
So please suggest where i am doing wrong or how to run my CI project in mac locally using nginx server.
Please or to participate in this conversation.