Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » one more question on redirection - I just don't get it...

Our old forums are still available as a read-only archive.

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

Page: 1 2
Go to End
Author Topic: 3100 Views
  • makeit
    Avatar
    Community Member
    15 Posts

    one more question on redirection - I just don't get it... Link to this post

    I know this must be annoying and I apologize for my ignorance, but there is something here I must be missing. I built a site over the last week with the pixelgreen base theme. When I type the fully qualified URL (www.domainname.tld/ I go the to home page as expected - All well and good - When I navigate around the site and select HOME from the top level menu, I get a blank page (the URL is looking for http://www.domainname.tld/home/ - which does not seem to exist or is redirected somehow. How can I get the 'home' page to display as both HOME and /? This may have worked briefly, as I didn't notice this until issue until recently. The site is at www.imakeit.net which is a workspace prior to moving to it's true domain so you can see for yourself. Any help appreciated.

    Bob

  • grilldan
    Avatar
    Community Member
    135 Posts

    Re: one more question on redirection - I just don't get it... Link to this post

    It displays correct for me. It might be your cache. Try clearing your cache or adding a ?flush=1 at the end of your url:

    http://www.imakeit.net/?flush=1

  • nlcluigi
    Avatar
    Community Member
    7 Posts

    Re: one more question on redirection - I just don't get it... Link to this post

    In the backend, you have a field where you can define that home page.

  • nlcluigi
    Avatar
    Community Member
    7 Posts

    Re: one more question on redirection - I just don't get it... Link to this post

    @grilldan: http://www.imakeit.net is fine. He talk about http://www.imakeit.net/home wich is blank.

  • grilldan
    Avatar
    Community Member
    135 Posts

    Re: one more question on redirection - I just don't get it... Link to this post

    A quick fix would be to write a rewrite script in the .htaccess file to go from /home/ to /.

  • makeit
    Avatar
    Community Member
    15 Posts

    Re: one more question on redirection - I just don't get it... Link to this post

    Not sure how to add a rewrite script, but there must be something wrong for this to be acting the way it is. Here is my .htaccess file now - Am I missing something?

    ### SILVERSTRIPE START ###
    RewriteEngine On
    RewriteBase /

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

  • grilldan
    Avatar
    Community Member
    135 Posts

    Re: one more question on redirection - I just don't get it... Link to this post

    Your script is right. You can Google for ".htaccess rewrite" that should give you some good information about .htaccess rewrites.

    My guess would be it is something like this:

    RewriteEngine on
    RewriteRule ^\home\$ \

    But I don't know off the top of my head.

    ***just remembered somthing***

    Is the name of your home page "home" or did you rename it? That could be the issue.

  • nlcluigi
    Avatar
    Community Member
    7 Posts

    Re: one more question on redirection - I just don't get it... Link to this post

    Mine is like:
    ### SILVERSTRIPE START ###
    <IfModule mod_dir.c>
    DirectorySlash Off
    </IfModule>

    RewriteEngine On
    RewriteBase /

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

    And ... we are not talking about this image no? You must set an page as homepage. In that case, I think that you can't name another page Home. Is just a guess.

    3100 Views
Page: 1 2
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.