Forum

Thread tagged as: Problem, Configuration, Runway

Non Perch Runway Directories Not Working

Hi

I've got a site using Runway but as part of this site we have some directories outside of Runway, so for example, www.domian.com/something.

Whenever you go to one of these non-Runway directories you get the Runway 404 error page.

I'm guessing I need to do something in the routeing, but I'm not sure what in order to make these non-Runway directories work?

Many thanks

Glen Piggott

Glen Piggott 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

How are you rewriting the URLs to start.php ?

RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/cms 
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* /cms/core/runway/start.php [L]
Drew McLellan

Drew McLellan 2638 points
Perch Support

Try:

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

As per https://docs.grabaperch.com/runway/getting-started/installing/rewrites/

Thanks Drew.

It was originally a fresh Runway install so didn't think of that.

Glen

Hi Drew

I've just noticed that because there is no index file in the root directory, when you go to our domain you now get the directory & file tree and not the home page in Runway...

https://soundwave.co.uk

If I remove the line RewriteCond %{REQUEST_FILENAME} !-d it works fine

Many thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, great.

Hi Drew

Do you know of a fix as I have some directories and files that are not part of Runway?

Thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

Sorry, I thought you said it was working fine.

Do you have rewrite rules for your other directories?

Hi Drew

I've removed the RewriteCond %{REQUEST_FILENAME} !-d from the .htaccess file that's in the root directory and added new .htaccess files to all the non-Runway directories with the following and all seems to be working great.

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

Thank you