Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9212547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:32:57+00:00 2026-06-18T01:32:57+00:00

is it possible to have a static (non-WordPress) html page that users will see

  • 0

is it possible to have a static (non-Wordpress) html page that users will see if they browse to my domain.

at the same time, i want to be able to work on my WordPress site continue to make changes and see the results. So, browsing to http://www.mydomain.com/index.php would bring up my WordPress site, but http://www.mydomain.com would bring up the static HTML “under construction” page.

i understand that they is plugin for this, but is it possible to do it via htacess or sth.
like 301 redirect.

if so how do i write it into my htaccess file?

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase //
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:32:59+00:00Added an answer on June 18, 2026 at 1:32 am

    One way to solve this is to only show the website to admins. Your solution will not work for subpages, so people coming from direct links will still see your website.

    add_action( 'template_redirect', function() {
        if( !current_user_can( 'manage_options' ) ) {
            include( get_template_directory() . '/static_html.html' );
            exit;
        }
    });
    

    If you put the above in functions.php, it will block non-admins from viewing any page at all that uses the theme. But you, as an admin, will be completely unimpeded.

    (‘manage_options’ is a capability that only admins have by default. If you’ve messed with the capabilities you can either pick another admin exclusive capability or check the role explicitly, have a look at http://docs.appthemes.com/tutorials/wordpress-check-user-role-function/)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In PHP, is it possible to have a function within a class that's non-static,
changing a static resource during runtine is something that sounds not possible. I have
Possible Duplicate: non static method cannot be referenced from static context hey i have
Is it possible to have final transient fields that are set to any non-default
Is it possible or makes sense to have static dynamic variables on a class,
Possible Duplicate: C++ static virtual members? Can we have a static virtual functions? If
Possible Duplicate: What does it mean to have an undefined reference to a static
Is it possible have two projects with the same name in flex builder? Here
Is it possible to have a free iPhone app that has say an initial
Possible Duplicate: An object reference is required for the non-static field, method, or property

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.