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   3258 Views

Avatar
nodevice

Community Member, 37 Posts

7 June 2007 at 8:33pm

Edited: 07/06/2007 8:51pm

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

Google Summer of Code Hacker, 222 Posts

8 June 2007 at 3:23am

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

Community Member, 37 Posts

8 June 2007 at 4:31am

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

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

8 June 2007 at 6:24am

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

Community Member, 37 Posts

8 June 2007 at 2:43pm

Whath do you exactly mean with:

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

Wath lines should I put??

Thanks for the help!!!

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

9 June 2007 at 4:35am

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

Community Member, 37 Posts

10 June 2007 at 12:31pm

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

Community Member, 37 Posts

11 June 2007 at 5:01pm

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