Welcome Guest, Not a member yet? Register   Sign In
URL Rewriting
#1

[eluser]Unknown[/eluser]
Hey guys -

I'll try not to be too redundant to the slew of other posts on the subject. I am new to rewriting URLs and I've searched both on this forum and others on the topic.

I need to rewrite all requests for http://site.com/ to http://site.com/home/

I know this is easy but I can't seem to get it right.

Any information and patience you could give me would be very helpful.

Regards,
sk_leb
#2

[eluser]Deveron[/eluser]
Hi,

you can define a default controller in your /config/routes.php, that should do it.
Code:
$route['default_controller'] = "home";

Cheers
#3

[eluser]Unknown[/eluser]
Thanks! That was simple. It was still set to "Welcome" - and I forgot I had removed the Welcome controller.

Regards,
sk_leb
#4

[eluser]Unknown[/eluser]
Is it better to have URLs with hyphens or underscores?
#5

[eluser]Deveron[/eluser]
Hi PureBlue,

that is a different topic but..
it doesn't matter. it is up to you.

If you compare you will see that most of the sites and blogs around the web are using hyphens/dashes.




Theme © iAndrew 2016 - Forum software by © MyBB