Welcome Guest, Not a member yet? Register   Sign In
friendly url for a simple page
#1

[eluser]neosable[/eluser]
Hi
how can I this work:
www.mysite.com/about-us
Code:
class About-us  extends Controller {

    function About-us()
    {
        parent::Controller();    
    }
}
is displaying an error on the class for using '-' in the class name

any thoughts ?
#2

[eluser]pistolPete[/eluser]
Use routing or a .htaccess file with mod_rewrite.

http://ellislab.com/forums/viewthread/69385/
http://ellislab.com/forums/viewthread/74389/
http://ellislab.com/forums/viewthread/48042/
#3

[eluser]Daniel Moore[/eluser]
The best practice would be to not use a hyphen/dash in the name. I recommend changing your class from "About-us" to "About_us".

That is the simplest method. It is almost always correct to go with the simplest method when solving these types of issues. Since this is a simple site, that is how I would recommend going about it. I can see no need for using a dash for a controller named "About us" anyway.




Theme © iAndrew 2016 - Forum software by © MyBB