Welcome Guest, Not a member yet? Register   Sign In
404 Page Not Found The page you requested was not found.
#1

[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
#2

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

[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
#4

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

[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?
#6

[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
#7

[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>




Theme © iAndrew 2016 - Forum software by © MyBB