Forum
Master Page template giving 404 errors
Hi Folks, Starting a new thread which has spun off an other thread as I've invariably run into a new problem. I'm using Perch Runway and it is up and running so far without issue. I'm setting up routing for a product detail page and I've noticed that when trying to create a new page based on my master page template, no matter what I do, I get a 404 error on the browser. I've tried creating a page on the default pages template and get the same thing, I've also tried a separate pages template from a different website, again it just goes straight to 404. Are there any known issues with pages app, runway and web-hosting? The site is on SSL, could this have any bearing? All Perch SSL rules are applied in config file and static files. Here are my details:
HTACCESS FILE
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
# Perch Runway
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/perch
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /perch/core/runway/start.php [L]
DIAGNOSTICS
Perch Runway: 3.1.2, PHP: 7.1.20, MySQL: 5.6.39, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.1.2), assets (3.1.2), categories (3.1.2), perch_blog (5.6.1), perch_shop_orders (1.2.6), perch_shop_products (1.2.6), chirp_seo (1.2.1), perch_shop (1.2.6), perch_members (1.6.4)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_members', 'perch_shop', ); ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/vhosts/142/1004491/webspace/httpdocs/perch
PERCH_CORE: /var/www/vhosts/142/1004491/webspace/httpdocs/perch/core
PERCH_RESFILEPATH: /var/www/vhosts/142/1004491/webspace/httpdocs/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 32M, Max POST 32M, Memory: 256M, Total max file upload: 32M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: www.lirchocolates.com
DOCUMENT_ROOT: /var/www/vhosts/142/1004491/webspace/httpdocs
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
MASTER PAGE TEMPLATE
<?php include($_SERVER['DOCUMENT_ROOT'].'/perch/runtime.php'); ?>
<?php perch_layout('shop.header'); ?>
<div class="brand shop-hero">
<div class="container">
<div class="logo-wrapper"><img src="../images/lir-master-light-horiz2.png" srcset="../images/lir-master-light-horiz2-p-1080.png 1080w, ../images/lir-master-light-horiz2-p-1600.png 1600w, ../images/lir-master-light-horiz2.png 1687w" sizes="(max-width: 479px) 72vw, (max-width: 991px) 40vw, 32vw" class="logo"></div>
</div>
</div>
<div class="container"></div>
<div class="product">
<div class="container">
<div class="blog-posting w-row">
<div class="left-col w-col w-col-4">
<?php perch_categories([
'template' => 'category.html',
'category' => 'shop/'.perch_get('category'),
]
); ?>
<a href="../shop/index.php" class="button b2b w-button">back to shop</a>
<div class="share">
<h3>share this post</h3>
</div>
<div class="sharethis">
<div class="sharethiscode w-embed">
<div class="sharethis-inline-share-buttons"></div>
</div>
</div>
</div>
<div class="right-col w-col w-col-8">
<?php perch_shop_product(perch_get('product'));?>
</div>
</div>
</div>
</div>
<?php perch_layout('blog.footer'); ?>
Do you get Runway's 404 page or the web server's 404 page?
It looks like hosting errors:
Error occurred: 404 - not found Apache Server at: d1473222-97667.blacknighthosting.com
That's from your web server, so the request isn't getting to Runway at all.
Okay, any idea what might be the route cause or what to approach my hosting company with? Is it a permissions thing perhaps?
It's likely your
.htaccess
not being read, or being incorrect.Thanks Drew, I'm working on a Mac and although it was named .htaccess, the server was still picking it up as .htaccess.txt This particular issue is now fixed.