Jump to:

22975 Posts in 11620 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » SS Rewriting URLs? SlideshowPro problem ...

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1040 Views
  • Valorinbattle
    Avatar
    Community Member
    95 Posts

    SS Rewriting URLs? SlideshowPro problem ... Link to this post

    I am using SlideshowPro on my homepage for a flash slideshow banner. Following the instructions I found in here, I was able to get it functioning perfectly except this:

    In the component inspector, I set the default path as http://mysite.com/home/xml
    So if I browse to http://mysite.com the slideshow loads perfectly.
    But if I browse to http://www.mysite.com the slideshow never loads because the default path is listed without the WWW.

    So, how can I set the default path to include and not include the WWW?

    I tried to go into my hosting account and just create a redirect so that if anyone went to http://www.mysite.com it would redirect to http://mysite.com, but it won't take. My host (A2Hosting) says that it seems SS is rewriting my URLs. I don't think that makes any sense, but am not sure what else to do. Any ideas?

    Thanks for your help everyone.
    ~ James

  • Solo
    Avatar
    Community Member
    32 Posts

    Re: SS Rewriting URLs? SlideshowPro problem ... Link to this post

    Edit .htaccess file, and put there:
    RewriteCond %{HTTP_HOST} ^www.yoursite.com
    RewriteRule (.*) http://yoursite.com/$1 [R=301,L]

  • Valorinbattle
    Avatar
    Community Member
    95 Posts

    Re: SS Rewriting URLs? SlideshowPro problem ... Link to this post

    Solo, that was awesome! Thank you. It makes the very first page on the re-direct non-friendly, but after that all's good. This was a very simple solution. Kudos to you.

  • banal
    Avatar
    Community Member
    901 Posts

    Re: SS Rewriting URLs? SlideshowPro problem ... Link to this post

    The slideshow actually never loads because of Flashs security Model. If you want to fix this (and don't want to rely on the rewrite or rather prefer the www in your url) then do the following:
    Create a file named crossdomain.xml with the follwing contents:

    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
        <allow-access-from domain="www.mysite.com" />
        <allow-access-from domain="mysite.com" />
    </cross-domain-policy>

    Upload it to your web-root. Done.
    If you have other domain-names pointing to the same content (aliases), add them to the list of allowed domains as well.

  • Valorinbattle
    Avatar
    Community Member
    95 Posts

    Re: SS Rewriting URLs? SlideshowPro problem ... Link to this post

    Thanks Banal. I'll give that a shot tomorrow!

    1040 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.