Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

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

stop ?url= appearing


Reply


5 Posts   1153 Views

Avatar
chris_d

Community Member, 21 Posts

20 January 2009 at 2:08am

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

Avatar
Fuzz10

Community Member, 787 Posts

20 January 2009 at 4:58am

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

Avatar
chris_d

Community Member, 21 Posts

20 January 2009 at 5:08am

hmm dont suppose you found a solution?

Avatar
Fuzz10

Community Member, 787 Posts

20 January 2009 at 8:38am

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 !! ;-)

Avatar
chris_d

Community Member, 21 Posts

20 January 2009 at 11:21pm

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 ###