21491 Posts in 5783 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 190 Views |
-
Changing the homepage

5 December 2012 at 3:58am
SilverStripe 2.4.7
Hi
I have implemented a method which outputs html and I call it this way. www.mysite.com/myclass/html
My client has now decided that they want this page displayed as the homepage so when a user types in www.mysite.com it will come up. Is there a way I can achieve this in SilverStripe? I know that I can use Redirector pages but that doesn't mask the URL.
Thanks
-
Re: Changing the homepage

5 December 2012 at 12:07pm
So how do you want the URL to act exactly?
If I type in www.mysite.com, do you want me redirect to www.mysite.com/myclass/html? Or do you just want the content from the latter to display without the URL changing?
-
Re: Changing the homepage

5 December 2012 at 9:58pm
Hi Double-A-Ron
Thanks for replying so quick. I want the content from the latter to display without the URL changing. Sorry if this is a really obvious question, it has me stumped though.
Thanks
-
Re: Changing the homepage

5 December 2012 at 10:17pm
Is the method you speak of at www.mysite.com/myclass/html a Silverstripe page or plain PHP?
Personally, I would simply port that page into your /mysite/code/HomePage.php classes so your homepage becomes a replica of the page above.
You can use htaccess to redirect traffic hitting the homepage to a particular URL, but the URL will change as a result.
-
Re: Changing the homepage

5 December 2012 at 10:23pm
It's a SilverStripe page with a method in the controller. I have to parse HTML before it is displayed so I wasn't sure how else to do it. Ok, I'll transfer it all to a HomePage. Thanks for your help.
| 190 Views | ||
|
Page:
1
|
Go to Top |


