Forum

Thread tagged as: Problem, Runway

Index.php in Runway

I'm currently converting a few pages I created in Perch to use Runway's routing. My index.php page has been added to templates -> pages and I've created a new page through Perch using that template. The location path for the page is / but when I navigate there it just shows a directory listing.

I'm using the latest version of Runway and my .htaccess is same as the second example here - https://docs.grabaperch.com/runway/installing/rewrites/

Mike Barker

Mike Barker 0 points

  • 6 years ago

Hi Mike

I ran into the same problem recently. Same setup as you, index.php was in templates > pages and I'd set the location path to /. I got it working by commenting out RewriteCond %{REQUEST_FILENAME} !-d

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

Hope this helps.

Hi Stephen,

Thanks for the heads up. Had a look into it and found this for the regex: "If the request is for a real directory (one that exists on the server), index.php isn't served." so looks like I won't need it.

Cheers