Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Two issues need to be solved:</p> <ol> <li>Serve a particular HTML file whenever someone needs the front page.</li> <li>Serve static files from a static directory alongside WordPress.</li> </ol> <p>To solve the first issue, I would rename index.html to front-page.php and move it inside my current theme folder. Then WordPress would serve it (or rather: use it as a template) whenever someone requests the front page, according to the <a href="http://codex.wordpress.org/File%3aTemplate_Hierarchy.png" rel="nofollow">Template Hierarchy</a>.</p> <p>There is a cost to this solution compared to actually serving a static file: Whenever someone requests you front page, WordPress will still be loaded. If the goal of serving your front page statically is to save server resources by not loading WordPress or PHP on every page load, you should look into caching plugins.</p> <p>The second issue should not be an issue at all, because the standard WordPress rewrite rules already allow for static files and directories. The lines</p> <pre><code>RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d </code></pre> <p>mean that the redirect to WordPress won't happen if the URL requested is an actual file (-f) or directory (-d). Therefore you will not need any extra rewrite rules to access the /business directory.</p> <p>The standard WordPress rewrite rules are explained below:</p> <pre><code>RewriteEngine On # Turn on the rewrite engine RewriteBase / # Use the domain root as the base of rewrites RewriteRule ^index\.php$ - [L] # If someone requests the WordPress entry point, stop here RewriteCond %{REQUEST_FILENAME} !-f # If the requested URL is not an actual file ... RewriteCond %{REQUEST_FILENAME} !-d # ... and if the requested URL is not an actual directory ... RewriteRule . /index.php [L] # ... then rewrite it to the main WordPress entry point </code></pre> <p>When /index.php is loaded, this file will then in turn load WordPress and everything that comes with it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload