21295 Posts in 5734 Topics by 2602 members
| Go to End | ||
| Author | Topic: | 1222 Views |
-
Re: SS doing a SEO no,no... Duplicate content!

13 December 2011 at 7:51pm
AFAIK you can't do this easily in .htaccess. I spent a while banging my head on it. There are solutions if you want to hardcode your base url but this does not work for the framework so not suitable.
See http://open.silverstripe.org/ticket/6700 for a bit of a discussion on this as well as http://pastie.org/2373435. It doesn't trim the extension off like it probably should (didn't notice that behaviour).
-
Re: SS doing a SEO no,no... Duplicate content!

13 December 2011 at 10:51pm
Thanks for the help. I guess it a Page_Controller edit after all.
-
Re: SS doing a SEO no,no... Duplicate content!

4 January 2012 at 5:33am
Thanks Simon_w, it worked a charm
-
Re: SS doing a SEO no,no... Duplicate content!

7 January 2012 at 5:26am
Hmm, maybe I spoke too soon. When I try to login to the admin by appending /admin I get this error:
Fatal error: Call to a member function getExtension() on a non-object in /hsphere/local/home/client/mywebsite.co.uk/mysite/code/Page.php on line 36Anyone got any ideas how I could write an exception to allow the /admin sudo-folder to work? Otherwise it's working like a charm.
Thanks.
-
Re: SS doing a SEO no,no... Duplicate content!

10 January 2012 at 8:38pm
If you change the if statement to:
if($this->request && $this->request->getExtension()) {
it should work. Otherwise,if($this->request instanceof SS_HTTPRequest && $this->request->getExtension()) {
will. -
Re: SS doing a SEO no,no... Duplicate content!

12 January 2012 at 11:55am
Well my SEO pro is also not so happy about alot of stuff SS is doing, stuff like http://www.nobrainer.dk/?url=services and http://www.nobrainer.dk/index.php/services gives same page as http://www.nobrainer.dk/services and http://www.nobrainer.dk/services/ the missing trailing backslash i have fixed in the htaccess, but this stuff should really be fixed in core by advice from a SEO pro.
-
Re: SS doing a SEO no,no... Duplicate content!

21 February 2012 at 12:50am
Sorry for the delay in replying, but Thanks Simon, that update worked perfectly. This bit of code will be used on all of our SS projects from now on. Suggest this is made core.
Duncan.
| 1222 Views | ||
| Go to Top |


