Return URI Segment - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Return URI Segment (/showthread.php?tid=52770) Pages:
1
2
|
Return URI Segment - El Forum - 06-25-2012 [eluser]rash[/eluser] Hi, I have a site http://www.baxobeat.com When i click on Login button it goes to http://www.baxobeat.com/home/logIn this link. When i serch the code i found this lines of code. where home, login are not directories. $page_name = $this->uri->segment(2); $controller_name = $this->uri->segment(1); I didn't get this code. Now i want to change the code file into http://aapkapaper.com/demo/Baxobeat link. But the inner pages are not found. It shows 404 error. I don't know about uri segment...so how can i solve it.... can anyone help for this.............. Thanks in advance.. Return URI Segment - El Forum - 06-26-2012 [eluser]LuckyFella73[/eluser] Quote:Now i want to change the code file into http://aapkapaper.com/demo/Baxobeat link. Du you mean you want to have the same functionality but instead of calling "home/logIn" you want to have "demo/Baxobeat" in your URL? Return URI Segment - El Forum - 06-26-2012 [eluser]rash[/eluser] no i want to change the link as http://aapkapaper.com/demo/Baxobeat/home/login Return URI Segment - El Forum - 06-26-2012 [eluser]rash[/eluser] i mean i want to put the file into aapkapaper domain in demo folder as Baxobeat folder.... Previously it was on baxobeat domain. Return URI Segment - El Forum - 06-26-2012 [eluser]LuckyFella73[/eluser] Did you move the whole application to the new destination? If yes the code should work as before. Maybe you have to edit the htaccess file (rewriteBase). Return URI Segment - El Forum - 06-26-2012 [eluser]rash[/eluser] yes i want to move the whole application to the new destination, but after moving when i click the login button it shows the 404 error, can u please say why is this?? Real link http://www.baxobeat.com/ after changing the application to new destination this is the link http://aapkapaper.com/demo/Baxobeat/ Please check it.......... thank u... Return URI Segment - El Forum - 06-26-2012 [eluser]LuckyFella73[/eluser] Did you edit the .htaccess file like suggested? Try to set the rewriteBase according to the new location and see what happens. Return URI Segment - El Forum - 06-26-2012 [eluser]rash[/eluser] i tried it but no changes has been occured...... there are many .htaccess files which one i change?? Return URI Segment - El Forum - 06-26-2012 [eluser]LuckyFella73[/eluser] It would be the .htaccess in your root directory (where your index.php is located). There are different ways to set up a .htaccess file depending on the server environment and what exactly you want to achieve. An example .htaccess that works for my needs: Code: <IfModule mod_rewrite.c> If that doesn work for you do some research about .htaccess files and Codeigniter. There are many posts about that kind of issues. A good start before doing te research would be reading about the basics: http://ellislab.com/codeigniter/user-guide/general/urls.html Hope that helps Return URI Segment - El Forum - 06-28-2012 [eluser]rash[/eluser] Thank u for the reply but, when i put the .htaccess file on root directory it show some errors i.e.: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. can you help for this error......... |