It is going to be hard to give a solid answer without knowing exactly how you’ve cobbled things together but a preview always has preview=true
in the URL. Just check that.
if (isset($_GET['preview']) && 'true' == $_GET['preview']) {
// send the page to WordPress
} else {
// load index.html I guess ?
}
Related Posts:
- What does HTTP/1.1 302 mean exactly?
- Why is WordPress redirecting from http to https on a local environment?
- Redirect www to non-www htaccess
- Redirect from https to http or from http to https? [closed]
- Disabling the X-Redirect-By response header
- Get the final destination after WP_Http redirects (WordPress)
- Cant Access Website – Changed HTTP to HTTPs
- How to use https on one page only?
- WordPress index.php seems to perform unwanted redirect 301
- My site doesn’t redirect from HTTP to HTTPS
- Why does WP HTTP API switch the method (POST/PURGE) to GET when redirecting (302)?
- Wp Remote get with manual redirect
- Understanding Redirects
- Redirect HTTP request to HTTPS request
- Configure WordPress to listen on a port other than 80
- Moving site from HTTP to HTTPS
- WordPress HTTPS – ‘… better to use HTTP for installation …’
- How to force HTTP and stop SSL completey on WordPress website
- Redirect Restricted Page to 404
- Redirect user to original url after login?
- Site redirects to wrong url when saving settings
- Redirect blog page to latest post?
- WordPress site redirects to different wordpress domain on the same server after reuploading db backup
- Links to an exisiting Page are now redirecting to a draft page?
- Random and Erroneous WordPress Redirect
- Redirect Old domain & posts to new domain homepage
- Redirecting users to referrer page after logging in using custom login form
- add_rewrite_rule to pass entire path as a single parameter
- What is the wordpress way of displaying local external content?
- htaccess redirect dynamic posts
- RedirectMatch and Redirect interfering with each other
- Redirect all pages to homepage but still allow dashboard
- Return to where the user was, after log out
- Change ‘Back To Website’ link in wp-login.php
- How do I map a subdomain in wordpress to the primary domain in a multisite setup?
- htaccess rules not applied?
- Load time cost of using a redirect plugin v direct .htaccess entry
- Intercept the “lost password” action by first redirecting to an existing instructions page
- How to pass email values from one php page to another
- How to include error message on login
- WooCommerce unexpected behavior [closed]
- Force WordPress to load from site’s hostname
- 301 redirection editing .htaccess doesn’t work
- Redirect custom post type from one domain to another domain
- How can I force the user to log in, even if they’re already authenticated?
- 301-redirect directives for blogger to wordpress migration
- Redirect users after register (first login) and force submit post
- Stop Redirecting to and from www
- How to pass a message using template_redirect
- Disable WordPress URL auto complete
- Redirect specific URL before other redirects take place in .htaccess?
- Redirect Main Home Page url to category URL without plugin
- W3 Cache redirects to front page when I press purge all caches
- Stop forcing certain paths to end with a forward slash
- Force 404 redirect to home?
- Is it possible to wp_redirect() to a new tab?
- Redirection on Custom page
- How do I redirect users after submitting a topic for moderation?
- Direct iPhone visitors to different stylesheet?
- How to delete a post and keep its slug to refer to another post
- 301 redirect any RSS feed on level up url
- Dynamic 404 page content while still keeping 404 status code?
- Redirect loop with similar URLs
- Redirect user to specific link after login
- 301 redirect via htaccess rules on the new site
- WordPress Domain redirects to different host
- Change the domain url?
- Change Category Slug Redirection
- custom login form redirect problem
- Trying to re-direct users to specific page based on an ACF variable
- wp_redirect is only working in Chrome Network, page is not redirecting
- Bulk redirect all post
- Open wordpress page in directory the way index.html would open
- How force WordPress redirect to current custom page after login
- How to remove redirection
- Redirect Homepage to another page when user login
- Redirect error after updating WordPress to 5.4.2
- Determine user destination on wp-login.php
- Disable WordPress URL auto Redirect
- Toggle Redirect Function On/Off With Checkbox
- My wordpress site has “https://” on it but when I go to Dashboard and click visit site, it removes the “https://”
- After disabling Multisite, homepage redirects to non-existing page
- I get “too many redirects” problem when migrating localhost site
- Internal redirect from page to category
- All links redirecting to homepage
- How to redirect non-admin/editors from specific pages?
- How to make a redirect link in wordpress?
- wp_redirect leading to an infinite loop
- Do I need to keep the original page when 301 redirecting to a new one?
- I’ve move my site but URL still goes to the old site
- Redirect attachment URL
- Redirect based on $_GET parameters
- Conditional redirection with logout
- redirect users to the login page
- Redirect to 404.php from single.php
- How to make my homepage automatically redirect to an external website?
- How to Redirect Url to homepage?
- 404 Not Found with All Cloaking plugins
- Stopping media file redirects
- After migration index page still redirects to old url