Jump to:

23482 Posts in 18965 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » stop ?url= appearing

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: 1079 Views
  • chris_d
    Avatar
    Community Member
    21 Posts

    stop ?url= appearing Link to this post

    Hi,

    On some pages I'm finding that ?url= is automatically added to the end of URLs,

    eg http://www.rustyspigot.com/NetZero is rewritten to http://www.rustyspigot.com/NetZero/?url=/NetZero

    Is there some way I can turn this off? Perhaps with .htaccess?

    Im using the nested urls branch which may be causing this.

    Thanks for any suggestions,
    Chris

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: stop ?url= appearing Link to this post

    This issue came back for me as well (in 2.3)....

  • chris_d
    Avatar
    Community Member
    21 Posts

    Re: stop ?url= appearing Link to this post

    hmm dont suppose you found a solution?

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: stop ?url= appearing Link to this post

    Nah.. But if I remember correctly a solution floats on the forum... I think it had to do something with trailing-slash in .htaccess ..

    Sam .... help !! ;-)

  • chris_d
    Avatar
    Community Member
    21 Posts

    Re: stop ?url= appearing Link to this post

    Hey Fuzz ,thanks for your help - after a forum search i found http://www.silverstripe.org/archive/show/53326 and changing my htaccess fixed this. smiles

    ### Mod_rewrite

    RewriteEngine On

    RewriteCond %{HTTP_HOST} ^domain\.com.\au [NC]
    RewriteRule ^(.*)$ http://www.domain.com.au/$1 [R=301,L]

    ### SILVERSTRIPE START ###

    RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
    RewriteCond %{REQUEST_URI} !/$
    RewriteCond %{REQUEST_URI} !^/admin
    # Redirect to add a trailing slash
    RewriteRule (.*) http://www.domain.com.au/$1/ [R=301,L]

    RewriteCond %{REQUEST_URI} ^/home/$ [NC]
    RewriteRule (.*) http://www.domain.com.au/ [R=301,L]

    RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    ### SILVERSTRIPE END ###

    1079 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.