Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Site works fine, Phpbb gets "Page not found"

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

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

Page: 1
Go to End
Author Topic: 3029 Views
  • nodevice
    Avatar
    Community Member
    37 Posts

    Site works fine, Phpbb gets "Page not found" Link to this post

    I'm implementing my site at www.naciondnb.com/site/ and it works fine, but since I redirected my domain in dreamhost panel from www.naciondnb.com to www.naciondnb.com/site/ to get the site working, I lost my phpbb forum located at www.naciondnb.com/foro/ now I get the Silverstripe "not found page".

    Tryed this but it did'nt work
    http://www.silverstripe.com/general-discussion/flat/563?showPost=565#post565

    Thanks

  • elijahlofgren
    Avatar
    Google Summer of Code Hacker
    222 Posts

    Re: Site works fine, Phpbb gets "Page not found" Link to this post

    Hi nodevice,

    I did the following and it worked for my site:
    1. Open .htaccess (probably located in your public_html folder)
    2. Add this line near the end:
    RewriteCond %{REQUEST_FILENAME} !-d
    so that the file looks like this:

    ### SILVERSTRIPE START ###
    RewriteEngine On

    RewriteRule \.js$ - [L]
    RewriteRule \.css$ - [L]
    RewriteRule \.png$ - [L]
    RewriteRule \.jpg$ - [L]
    RewriteRule \.gif$ - [L]
    RewriteRule \.php$ - [L]

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

    Hope this helps,

    Elijah Lofgren

  • nodevice
    Avatar
    Community Member
    37 Posts

    Re: Site works fine, Phpbb gets "Page not found" Link to this post

    Elijah, I made the changes but I'm still getting "Page not found"

  • elijahlofgren
    Avatar
    Google Summer of Code Hacker
    222 Posts

    Re: Site works fine, Phpbb gets "Page not found" Link to this post

    That's strange.

    Maybe you could try the workaround suggested here by xmedeko: http://www.silverstripe.com/bugs/flat/1292#post1353

    First, move the line

    RewriteEngine On

    to be the first line in .htaccess, then add

    ## foro is not in SilverStripe
    RewriteRule ^foro$ - [L]
    RewriteRule ^foro/.* - [L]

    and finaly put lines after
    ### SILVERSTRIPE START ###
    ...

    Hope this helps,

    Elijah

  • nodevice
    Avatar
    Community Member
    37 Posts

    Re: Site works fine, Phpbb gets "Page not found" Link to this post

    Whath do you exactly mean with:

    and finaly put lines after
    ### SILVERSTRIPE START ###
    ...

    Wath lines should I put??

    Thanks for the help!!!

  • elijahlofgren
    Avatar
    Google Summer of Code Hacker
    222 Posts

    Re: Site works fine, Phpbb gets "Page not found" Link to this post

    Just put these regular lines after the other stuff:

    ### SILVERSTRIPE START ###
    RewriteEngine On

    RewriteRule \.js$ - [L]
    RewriteRule \.css$ - [L]
    RewriteRule \.png$ - [L]
    RewriteRule \.jpg$ - [L]
    RewriteRule \.gif$ - [L]
    RewriteRule \.php$ - [L]

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

    Hope this helps,

    Elijah

  • nodevice
    Avatar
    Community Member
    37 Posts

    Re: Site works fine, Phpbb gets "Page not found" Link to this post

    Still not working
    Here's my .htaccess file at /naciondnb.com/site/.htaccess

    ### SILVERSTRIPE START ###
    RewriteEngine On
    ## foro is not in SilverStripe
    RewriteRule ^foro$ - [L]
    RewriteRule ^foro/.* - [L]

    RewriteRule \.js$ - [L]
    RewriteRule \.css$ - [L]
    RewriteRule \.png$ - [L]
    RewriteRule \.jpg$ - [L]
    RewriteRule \.gif$ - [L]
    RewriteRule \.php$ - [L]

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

    My phpbb forum is at www.nacindnb.com/foro/
    My web directory in dreamhost control panel is mapped to my Silverstripe installation folder at naciondnb.com/site/

    Thanks for the help elijahlofgren!

  • nodevice
    Avatar
    Community Member
    37 Posts

    Re: Site works fine, Phpbb gets "Page not found" Link to this post

    The problem was with the redirection on the dreamhost panel, it was telling the browser to send www.naciondnb.com to www.naciondnb.com/site/ (silverstripe installation).

    Changed it to the default, and redirected with another .htaccess on the domain root.

    Then your solution worked perfectly!!
    Thank's

    Elijah

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