Forum

Thread tagged as: Error, Installation, Runway

Runway throwing 404 errors

Hello,

So i have successfully upgrade 1 current site to Runway! So tonight I was working on another upgrade. I have done everything correct like the previous one, as well as followed the docs. But no matter what when using the router it just throws a 404 page. "Sorry, that page could not be found."

I had to comment out the routing in the .htaccess file to get the site to show again.

I did notice that my first upgrade was 2.7.1 and this one was 2.7.2 not sure if that had anything to do with it.

Has anyone ran into this problem when it just throw the 404 no matter what?

Thanks, Brandon

Brandon Livengood

Brandon Livengood 1 points

  • 7 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

You'd need to give us some more information about the structure of your site and the steps you have followed including which set of rules you used. Runway doesn't "throw 404 errors" your server does when a file is not found at the expected location.

It is a pretty basic site, there are zero add-ons and I am not using any listing and details pages. It's just about 6 directories that have about 5-10 pages in each folder.

Here is my .htaccess file you will notice that runway is currently commented out at the moment so that the page will load.

Options -Indexes +FollowSymLinks

# Perch Runway
RewriteEngine On
#RewriteCond %{REQUEST_URI} !^/admin 
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule .* /admin/core/runway/start.php [L] 

### REMOVE .PHP AND ADD SLASH ###
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{THE_REQUEST} ^GET\ /[^?\s]+\.php
RewriteRule (.*)\.php$ /$1/ [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)/$ $1.php [L]
Drew McLellan

Drew McLellan 2638 points
Perch Support

Once you've converted the directory to use master pages, have you removed the files from the site root?

Otherwise this:

RewriteCond %{REQUEST_URI} !^/admin 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /admin/core/runway/start.php [L] 

will need to be:

RewriteCond %{REQUEST_URI} !^/admin 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* /admin/core/runway/start.php [L] 

The first thing I did was move the index.php file to the pages directory and renamed it home.php and added the runway runtime at the top.

Then I removed the index.php from the root of the site, then I went into the page options and choose the home template and changed the path to /

Then I get on the home page.

Sorry, that page could not be found.

but its not the traditional 404 it is coming from the /pages/errors/404.php file

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, did you change the rewrite rules as above?

Yes, no matter what method or what rules I use, I still get the 404 error message that is driven from the /pages/errors/404.php file

So I know that 2.7.1 was working on another site so I downgraded this from 2.7.2 to 2.7.1 and now the 404 error goes away and everything with the router works. I don't know if there was a bug or if I just had a bad install/upload of files that was causing it to go haywire. But this has now been sorted.

Drew McLellan

Drew McLellan 2638 points
Perch Support

2.7.2 didn't change anything in that regard.

I have this same problem, I install Runway and everything is completely fine. But it just can't see any of the master pages.

My .htaccess file is exactly how it is in the docs.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Damien, if you have a problem then please start a new thread giving enough detail for us to help you.