Welcome Guest, Not a member yet? Register   Sign In
page not loading when passing additional parameter in url
#1

[eluser]ravindral[/eluser]
I am having tutor_details view page. it displays page when i use url

http://localhost/ci/mdtutors/index.php/t...or_details


But when i want to show tutors of particular id, i am passing its id in the url as given below. But page is not getting displayed.

http://localhost/ci/mdtutors/index.php/t..._details/1


I am getting error :
////////////////////
404 Page Not Found.
The page you requested was not found.

/////////////

I am using typo3 wamp server to execute the php. Also mod_rewrite is enabled in conf file. Please help to resolve the problem for showing the page.

Thank you.
#2

[eluser]slowgary[/eluser]
I believe the problem is with your server or mod_rewrite. If you can access the page by visiting:
Code:
http://localhost/ci/mdtutors/index.php/teacher/tutor_details

Then no matter WHAT segments you append to that URL, you should still be able to access the page. Try adding a trailing slash, like so:
Code:
http://localhost/ci/mdtutors/index.php/teacher/tutor_details/

Can you still access it?

You may need to crack open the CodeIgniter config file (system/application/config/config.php) and tinker with the $config['uri_protocol'] parameter. There are a few different possible values for that config item and they're specified in comments in config.php. Try them all and see if it makes a difference.

I hope this helps.
#3

[eluser]ravindral[/eluser]
http://localhost/ci/mdtutors/index.php/t...r_details/
Trailing / also shows the page.

I tried each of the parameter.
| 'PATH_INFO' Uses the PATH_INFO
| 'QUERY_STRING' Uses the QUERY_STRING
| 'REQUEST_URI' Uses the REQUEST_URI
| 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO

when QUERY_STRING and ORIG_PATH_INFO are used,

http://localhost/ci/mdtutors/index.php/t..._details/1

shows home page and not the specific tutor_details page. other PATH_INFO and REQUEST_URI are showing 404 not found error.

Please guide me.

Thanks.
#4

[eluser]slowgary[/eluser]
What do you mean by "the home page"?
#5

[eluser]ravindral[/eluser]
Home page means http://localhost/ci/mdtutors page (that is when site's index/home page).
#6

[eluser]slowgary[/eluser]
What do you have in your .htaccess?
#7

[eluser]ravindral[/eluser]
.htaccess has nothing in it. Is any setting required in htaccess file?

Thank you for replies.
#8

[eluser]slowgary[/eluser]
Oh yeah, you're still using index.php in the path. You mentioned using mod_rewrite earlier, so it threw me off.

If you're not using mod_rewrite, you shouldn't have any problems. Does your config file still have this:
Code:
$config['index_page'] = "index.php";

??

Set $config['uri_protocol'] back to 'AUTO'
#9

[eluser]ravindral[/eluser]
Yes
$config['index_page'] = "index.php";
is already set.
and $config[‘uri_protocol’] is set to 'AUTO'.

Still
http://localhost/ci/mdtutors/index.php/t..._details/1
not working.

Thanks.
#10

[eluser]slowgary[/eluser]
So when you visit:
Code:
http://localhost/ci/mdtutors/index.php/teacher/tutor_details/1
You get your default controller, which is mdtutors?
Code:
//mdtutors controller
class Mdtutors extends Controller
{
}

//system/application/config/routes.php
$route['default_controller'] = "Mdtutors";

Is that what you have?




Theme © iAndrew 2016 - Forum software by © MyBB