Welcome Guest, Not a member yet? Register   Sign In
base url's
#1

[eluser]OES[/eluser]
Hi again im still new so please be gentle.

Once you have loaded a base controler ie.

Code:
$route['default_controller'] = 'welcome';

Then in config removed the index.php and added the .html extension. And have the .htacess file working :-).

Lets say I then want to add a set of base links ie.
Quote:/contact_us.html
/about_us.html
etc etc
How can you do it without having to display the base controler.

I can get them to work ie.
Quote:/welcome/contact_us.html
/welcome/about_us.html

I hope this makes sense.

Thanks in advance if you can help.
#2

[eluser]Pascal Kriete[/eluser]
Well, you probably won't have .html, but check out the controllers section of the user guide.

You make a new controller for each one and put the view you want to load in the index function (which gets loaded if you don't specify a function).
#3

[eluser]dirkr[/eluser]
[quote author="OES" date="1203296825"]

Lets say I then want to add a set of base links ie.
Quote:/contact_us.html
/about_us.html
etc etc
How can you do it without having to display the base controler.

I can get them to work ie.
Quote:/welcome/contact_us.html
/welcome/about_us.html
[/quote]


Code:
$route['contact_us'] = 'welcome/contact_us';
in system/application/routes.php

You might want to check out the user guide on routing.




Theme © iAndrew 2016 - Forum software by © MyBB