CodeIgniter Forums

Full Version: 404 Page Not Found The page you requested was not found.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]behnampmdg3[/eluser]
Hello;

Trying to get it to go to goldcoast_share_accommodation if the user goes to goldcoast-share-accommodation but I get 404.


Quote:http://test.com/goldcoast-share-accommodation/
Route in config
Code:
$route['Goldcoast-share-accommodation'] = "Goldcoast_share_accommodation";
Code:
class Goldcoast_share_accommodation extends CI_Controller {
public function __construct($id)
       {
            parent::__construct();
            $this->index($id);
       }

public function index($id)
  {
   print_r($id);
   /*$this->load->model('model_ads');
   $data['results'] = $this->model_ads->list_haves();
   $this->load->view('view_header', $data);
   $this->load->view('view_home_page', $data);
   $this->load->view('view_footer', $data);*/
  }
}
If I go directly to goldcoast_share_accommodation it works fine.

What am I doing wrong?

Thanks

El Forum

[eluser]CroNiX[/eluser]
Try changing the capital G's to lowercase in your route.

El Forum

[eluser]behnampmdg3[/eluser]
[quote author="CroNiX" date="1378251891"]Try changing the capital G's to lowercase in your route.[/quote]
Code:
$route['goldcoast-share-accommodation'] = "goldcoast_share_accommodation";
Same results Sad

El Forum

[eluser]behnampmdg3[/eluser]
[quote author="CroNiX" date="1378251891"]Try changing the capital G's to lowercase in your route.[/quote]No answer Cronix? Sad

El Forum

[eluser]CroNiX[/eluser]
Where is $id coming from that you are passing into your constructor?

Where is $id coming from that you are passing to your index method?

El Forum

[eluser]behnampmdg3[/eluser]
[quote author="CroNiX" date="1378266719"]Where is $id coming from that you are passing into your constructor?

Where is $id coming from that you are passing to your index method?
[/quote]here is a real link. Smile

El Forum

[eluser]behnampmdg3[/eluser]
This is my htaccess:

Code:
<IfModule mod_rewrite.c>
  RewriteEngine On
  

  RewriteCond %{REQUEST_URI} ^system.*
  RewriteRule ^(.*)$ /index.php?/$1 [L]

  RewriteCond %{REQUEST_URI} ^application.*
  RewriteRule ^(.*)$ /index.php?/$1 [L]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
  ErrorDocument 404 /index.php
</IfModule>