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.

Archive

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

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

Site works fine, Phpbb gets "Page not found"


Reply

8 Posts   3174 Views

Avatar
nodevice

7 June 2007 at 8:33pm (Last edited: 7 June 2007 8:51pm), Community Member, 37 Posts

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

Avatar
elijahlofgren

8 June 2007 at 3:23am Google Summer of Code Hacker, 222 Posts

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

Avatar
nodevice

8 June 2007 at 4:31am Community Member, 37 Posts

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

Avatar
elijahlofgren

8 June 2007 at 6:24am Google Summer of Code Hacker, 222 Posts

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

Avatar
nodevice

8 June 2007 at 2:43pm Community Member, 37 Posts

Whath do you exactly mean with:

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

Wath lines should I put??

Thanks for the help!!!

Avatar
elijahlofgren

9 June 2007 at 4:35am Google Summer of Code Hacker, 222 Posts

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

Avatar
nodevice

10 June 2007 at 12:31pm Community Member, 37 Posts

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!

Avatar
nodevice

11 June 2007 at 5:01pm Community Member, 37 Posts

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