PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, July 3, 2022

[FIXED] How do I host a static website inside a Wordpress multisite installation?

 July 03, 2022     multisite, php, wordpress     No comments   

Issue

I would like to do the following:

Wordpress Multisite
- hosted static site in the directory but not utilising wordpress
  Wordpress additional site
  - /blog subfolder
  Wordpress additional site
  - /jobboard subfolder
  Wordpress additional site
  - /other subfolder

In short, I want to host my static website as the main Wordpress Multisite's site. It's an exported HTML Website ready to go. I haven't got time to convert it into a Wordpress site.

Is this possible, and if so, how do I go about doing it?


Solution

It should be possible to just drop the static website into any WordPress directory.

This is made possible, because of the rewrite rules in the .htaccess file.

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Before rewriting any request, the rewrite engine will check to see whether the request maps to an existent file or directory. If it doesn't, it passes the request to WordPress.



Answered By - fubar
Answer Checked By - David Marino (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing