Login Page redirection error in PHP codeignitor project
I downloaded a CodeIgniter project from GitHub and hosted on localhost using XAMPP. Now when I am running it, it's showing me a login page, when I enter correct username password it's redirecting me to http://localhost/project/authlogincheck
. It's giving me this error 404 Page Not Found
. There is no file like authlogincheck
in the project. It should be redirected to http://localhost/project/application/views/dashboard
.
I downloaded it from GitHub. I am not giving code here as you guys can easily view all the files of this project from GitHub.
What is the possible solution for this problem? I am new to CodeIgniter and PHP.
Here is database info.
'dsn' => '',
'hostname' => 'localhost',
'username' => 'jason',
'password' => 'quarks321',
'database' => 'mlmdb',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
php codeigniter codeigniter-3
|
show 5 more comments
I downloaded a CodeIgniter project from GitHub and hosted on localhost using XAMPP. Now when I am running it, it's showing me a login page, when I enter correct username password it's redirecting me to http://localhost/project/authlogincheck
. It's giving me this error 404 Page Not Found
. There is no file like authlogincheck
in the project. It should be redirected to http://localhost/project/application/views/dashboard
.
I downloaded it from GitHub. I am not giving code here as you guys can easily view all the files of this project from GitHub.
What is the possible solution for this problem? I am new to CodeIgniter and PHP.
Here is database info.
'dsn' => '',
'hostname' => 'localhost',
'username' => 'jason',
'password' => 'quarks321',
'database' => 'mlmdb',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
php codeigniter codeigniter-3
Did you create database?
– Shahidul Islam
Nov 14 '18 at 11:31
Yes Shahidul bhai, i have created the database.
– Jason Bourne
Nov 14 '18 at 12:29
According to his code this should redirect you to localhost/v3/dashboard, so something is going wrong in the login function. Can you confirm your database is filled at all? Also try running composer install. This project has no decent readme about how to use it so it will be hard to help properly.
– killstreet
Nov 14 '18 at 13:13
@killstreet ya i saw that too. In his Youtube video, its redirected to v3/dashboard after login. IDK why he changed it. Can you suggest me some thing so that i can change redirected url? i try to change it but got no success. Its not letting me access other directories.
– Jason Bourne
Nov 14 '18 at 13:36
Honestly it's very conflicting with what you said about the redirect and what his online code shows. Are you 100% sure you linked the right code? On github there is only 1 branch and 1 commit so it never changed there. Is your code somehow different from his?
– killstreet
Nov 14 '18 at 13:37
|
show 5 more comments
I downloaded a CodeIgniter project from GitHub and hosted on localhost using XAMPP. Now when I am running it, it's showing me a login page, when I enter correct username password it's redirecting me to http://localhost/project/authlogincheck
. It's giving me this error 404 Page Not Found
. There is no file like authlogincheck
in the project. It should be redirected to http://localhost/project/application/views/dashboard
.
I downloaded it from GitHub. I am not giving code here as you guys can easily view all the files of this project from GitHub.
What is the possible solution for this problem? I am new to CodeIgniter and PHP.
Here is database info.
'dsn' => '',
'hostname' => 'localhost',
'username' => 'jason',
'password' => 'quarks321',
'database' => 'mlmdb',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
php codeigniter codeigniter-3
I downloaded a CodeIgniter project from GitHub and hosted on localhost using XAMPP. Now when I am running it, it's showing me a login page, when I enter correct username password it's redirecting me to http://localhost/project/authlogincheck
. It's giving me this error 404 Page Not Found
. There is no file like authlogincheck
in the project. It should be redirected to http://localhost/project/application/views/dashboard
.
I downloaded it from GitHub. I am not giving code here as you guys can easily view all the files of this project from GitHub.
What is the possible solution for this problem? I am new to CodeIgniter and PHP.
Here is database info.
'dsn' => '',
'hostname' => 'localhost',
'username' => 'jason',
'password' => 'quarks321',
'database' => 'mlmdb',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
php codeigniter codeigniter-3
php codeigniter codeigniter-3
edited Nov 14 '18 at 13:30
killstreet
761521
761521
asked Nov 14 '18 at 11:21
Jason BourneJason Bourne
157
157
Did you create database?
– Shahidul Islam
Nov 14 '18 at 11:31
Yes Shahidul bhai, i have created the database.
– Jason Bourne
Nov 14 '18 at 12:29
According to his code this should redirect you to localhost/v3/dashboard, so something is going wrong in the login function. Can you confirm your database is filled at all? Also try running composer install. This project has no decent readme about how to use it so it will be hard to help properly.
– killstreet
Nov 14 '18 at 13:13
@killstreet ya i saw that too. In his Youtube video, its redirected to v3/dashboard after login. IDK why he changed it. Can you suggest me some thing so that i can change redirected url? i try to change it but got no success. Its not letting me access other directories.
– Jason Bourne
Nov 14 '18 at 13:36
Honestly it's very conflicting with what you said about the redirect and what his online code shows. Are you 100% sure you linked the right code? On github there is only 1 branch and 1 commit so it never changed there. Is your code somehow different from his?
– killstreet
Nov 14 '18 at 13:37
|
show 5 more comments
Did you create database?
– Shahidul Islam
Nov 14 '18 at 11:31
Yes Shahidul bhai, i have created the database.
– Jason Bourne
Nov 14 '18 at 12:29
According to his code this should redirect you to localhost/v3/dashboard, so something is going wrong in the login function. Can you confirm your database is filled at all? Also try running composer install. This project has no decent readme about how to use it so it will be hard to help properly.
– killstreet
Nov 14 '18 at 13:13
@killstreet ya i saw that too. In his Youtube video, its redirected to v3/dashboard after login. IDK why he changed it. Can you suggest me some thing so that i can change redirected url? i try to change it but got no success. Its not letting me access other directories.
– Jason Bourne
Nov 14 '18 at 13:36
Honestly it's very conflicting with what you said about the redirect and what his online code shows. Are you 100% sure you linked the right code? On github there is only 1 branch and 1 commit so it never changed there. Is your code somehow different from his?
– killstreet
Nov 14 '18 at 13:37
Did you create database?
– Shahidul Islam
Nov 14 '18 at 11:31
Did you create database?
– Shahidul Islam
Nov 14 '18 at 11:31
Yes Shahidul bhai, i have created the database.
– Jason Bourne
Nov 14 '18 at 12:29
Yes Shahidul bhai, i have created the database.
– Jason Bourne
Nov 14 '18 at 12:29
According to his code this should redirect you to localhost/v3/dashboard, so something is going wrong in the login function. Can you confirm your database is filled at all? Also try running composer install. This project has no decent readme about how to use it so it will be hard to help properly.
– killstreet
Nov 14 '18 at 13:13
According to his code this should redirect you to localhost/v3/dashboard, so something is going wrong in the login function. Can you confirm your database is filled at all? Also try running composer install. This project has no decent readme about how to use it so it will be hard to help properly.
– killstreet
Nov 14 '18 at 13:13
@killstreet ya i saw that too. In his Youtube video, its redirected to v3/dashboard after login. IDK why he changed it. Can you suggest me some thing so that i can change redirected url? i try to change it but got no success. Its not letting me access other directories.
– Jason Bourne
Nov 14 '18 at 13:36
@killstreet ya i saw that too. In his Youtube video, its redirected to v3/dashboard after login. IDK why he changed it. Can you suggest me some thing so that i can change redirected url? i try to change it but got no success. Its not letting me access other directories.
– Jason Bourne
Nov 14 '18 at 13:36
Honestly it's very conflicting with what you said about the redirect and what his online code shows. Are you 100% sure you linked the right code? On github there is only 1 branch and 1 commit so it never changed there. Is your code somehow different from his?
– killstreet
Nov 14 '18 at 13:37
Honestly it's very conflicting with what you said about the redirect and what his online code shows. Are you 100% sure you linked the right code? On github there is only 1 branch and 1 commit so it never changed there. Is your code somehow different from his?
– killstreet
Nov 14 '18 at 13:37
|
show 5 more comments
2 Answers
2
active
oldest
votes
Add this to your .htaccess file (if the file doesn't exist create one at the root of the project )
RewriteEngine On
RewriteBase / # project document root
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)$ index.php/$1 [L]
I have .htaccess file and the code you provided is also same. Can you tell me whats wrong with this thing and why its redirecting to /authlogincheck instead of localhost/v3/dashboard
– Jason Bourne
Nov 14 '18 at 14:27
add a comment |
You can also do it by creating a web.config
file with following contents and place it in the root of your project
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53299048%2flogin-page-redirection-error-in-php-codeignitor-project%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Add this to your .htaccess file (if the file doesn't exist create one at the root of the project )
RewriteEngine On
RewriteBase / # project document root
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)$ index.php/$1 [L]
I have .htaccess file and the code you provided is also same. Can you tell me whats wrong with this thing and why its redirecting to /authlogincheck instead of localhost/v3/dashboard
– Jason Bourne
Nov 14 '18 at 14:27
add a comment |
Add this to your .htaccess file (if the file doesn't exist create one at the root of the project )
RewriteEngine On
RewriteBase / # project document root
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)$ index.php/$1 [L]
I have .htaccess file and the code you provided is also same. Can you tell me whats wrong with this thing and why its redirecting to /authlogincheck instead of localhost/v3/dashboard
– Jason Bourne
Nov 14 '18 at 14:27
add a comment |
Add this to your .htaccess file (if the file doesn't exist create one at the root of the project )
RewriteEngine On
RewriteBase / # project document root
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Add this to your .htaccess file (if the file doesn't exist create one at the root of the project )
RewriteEngine On
RewriteBase / # project document root
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^(.*)$ index.php/$1 [L]
answered Nov 14 '18 at 13:51
Bheru Lal LoharBheru Lal Lohar
393214
393214
I have .htaccess file and the code you provided is also same. Can you tell me whats wrong with this thing and why its redirecting to /authlogincheck instead of localhost/v3/dashboard
– Jason Bourne
Nov 14 '18 at 14:27
add a comment |
I have .htaccess file and the code you provided is also same. Can you tell me whats wrong with this thing and why its redirecting to /authlogincheck instead of localhost/v3/dashboard
– Jason Bourne
Nov 14 '18 at 14:27
I have .htaccess file and the code you provided is also same. Can you tell me whats wrong with this thing and why its redirecting to /authlogincheck instead of localhost/v3/dashboard
– Jason Bourne
Nov 14 '18 at 14:27
I have .htaccess file and the code you provided is also same. Can you tell me whats wrong with this thing and why its redirecting to /authlogincheck instead of localhost/v3/dashboard
– Jason Bourne
Nov 14 '18 at 14:27
add a comment |
You can also do it by creating a web.config
file with following contents and place it in the root of your project
add a comment |
You can also do it by creating a web.config
file with following contents and place it in the root of your project
add a comment |
You can also do it by creating a web.config
file with following contents and place it in the root of your project
You can also do it by creating a web.config
file with following contents and place it in the root of your project
answered Nov 15 '18 at 7:10
TwinkleTwinkle
173111
173111
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53299048%2flogin-page-redirection-error-in-php-codeignitor-project%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did you create database?
– Shahidul Islam
Nov 14 '18 at 11:31
Yes Shahidul bhai, i have created the database.
– Jason Bourne
Nov 14 '18 at 12:29
According to his code this should redirect you to localhost/v3/dashboard, so something is going wrong in the login function. Can you confirm your database is filled at all? Also try running composer install. This project has no decent readme about how to use it so it will be hard to help properly.
– killstreet
Nov 14 '18 at 13:13
@killstreet ya i saw that too. In his Youtube video, its redirected to v3/dashboard after login. IDK why he changed it. Can you suggest me some thing so that i can change redirected url? i try to change it but got no success. Its not letting me access other directories.
– Jason Bourne
Nov 14 '18 at 13:36
Honestly it's very conflicting with what you said about the redirect and what his online code shows. Are you 100% sure you linked the right code? On github there is only 1 branch and 1 commit so it never changed there. Is your code somehow different from his?
– killstreet
Nov 14 '18 at 13:37