I don’t know nginx well but you probably just want
location = /home.php {
return 301 /;
}
I’d put this in both the _http.conf and _https.conf files after the location = /robots.txt { ... }
block. You possibly want
location = /home.php {
return 301 https://$server_name/;
}
in the _http.conf version to include a redirect to HTTPS too.
Related Posts:
- How do I make a redirect in PHP?
- Nginx FastCGI_Cache Vs PHP Caching
- PHP – redirect https to http and www to non-www
- Redirect to Page after Post Submit
- How to redirect users to custom lostpassword page?
- Insert code when users come from an specific referer
- How to turn off redirection from ‘domain.com/login’ to ‘domain.com/wp-login.php’
- Is Auto Post recognition a WordPress feature? How to turn it off?
- WordPress media upload “HTTP error”
- Block PHP Files Nginx
- WordPress template_include filter not working properly
- Logout and redirect using the WP Menu
- Mysterious HTTP 404 header in my own scripts
- Change links automatically to affiliate links
- PHP Code stuck in Cache [Memcached] [closed]
- PHP If user is logged in & on home page redirect
- Woocommerce redirect thankyou page based on product ID doesn’t empty Cart
- WordPress does not load page.php, return 404.php
- 3 blogs same installation, without WP MU
- How to combine wordpress_logged_in cookies in one cookie?
- WordPress homepage infinite redirect
- Redirect undesirable domain
- how to combine wordpress htaccess on my root domain + php on subfolder
- Incorrect MIME type for assets with Valet
- WordPress & Fastcgi proper setup?
- How do I display the main domain for my WordPress install?
- NGINX rewrite rules for multisite
- Problem with login form
- Large Woocommerce Site (83,000 items), What Can I Do? [closed]
- Set Cache-Control header for 301 redirects
- How to redirect users based on role and content of redirect_to?
- Moving code from theme header to functions.php
- Showing latest post without 301 redirect
- Having Issue on Redirecting With Session in WordPress
- Using a $GET parameter from a URL, to redirect to a URL (WordPress)
- WordPress redirect redirecting too many times or not at all
- Using Argument from Function to Re-Direct Visitor (WordPress)
- I am receiving a pluggable.php warning sign on my only http:// page
- Login redirect. Check user meta and redirect accordingly
- Where to insert redirect code based on http_referer?
- Is this a correct usage of ob_start() in my WordPress project?
- How to allow download url redirection only if user logged in WordPress site?
- PHP Redirect condition
- Nginx WordPress and another Web app URL structure
- Manually Create PHP Page For A Redirect
- How to debug failed changes to posts?
- Redirect to current user page upon link click
- Which version of PHP-FPM is necessary to work with WP 3.5?
- Ajax URLs without #!, how to prevent falling into single.php on load or reload?
- Migrating site, only header shows
- Writing a link cloaking plugin
- WordPress permalink issue
- WP insert post Redirect after function has executed
- Infinite Loop in WordPress Installation
- How to redirect non logged in mobile users to page on same site?
- How to define a rule in functions.php that ONLY disables the default wp functionality that undesirably changes ‘&’ to ‘#038;’?
- Download file and redirect to page or vice versa
- Add more user roles to a PHP logout redirect function [closed]
- 404 on old link after changing post url
- WordPress url By country code?
- how can i redirect dynamic URL in worpress base on ID in htaccess or wp-config or function.php
- Implementing a multilingual WordPress site by installing several instances of WordPress and redirecting
- How to route root path / to /xyz in nginx?
- Why can’t I connect to the wordpress install page with Nginx?
- Remove all feeds and return custom 404 page
- Infinite loop when logging out using custom login form
- Sudden Upload HTTP errors, PHP uploads and memory limits are already to high to my taste. Anything else?
- Redirect User when they click Menu Option
- WordPress/NGINX not respecting the category URL for new posts
- WordPress: Redirect Main Site to Subsite in Multisite Where user is NOT logged in
- Need help with AJAX login to call php in functions.php to handle redirects based on user cap (role)
- wp-login.php?redirect_to=https problem
- ERR_TOO_MANY_REDIRECTS / To Force SSL Logins and SSL Admin Access
- WordPress Redirect / Add_Rewrite_Rule – Non Index.php Page
- Override 404 when navigating to single php file
- Submit to itself don’t work
- redirect 301 with special character like WIX site “#!”
- 301 redirect from webpage to wordpress page in the same root
- How to solve 404 permalink errors on nginx server
- Submitting my form to the database and then redirecting to payment site
- 3 domains, 1 wordpress install, redirecting and changing domains on live site
- Get permalink for a post from inside WordPress and route to a related site
- Redirect users not logged in to the standard login page (and back) from some posts and pages
- Link to external page has wordpress blog-url inside
- How to use multiple 404 Error Pages in WordPress
- How to create a WordPress PAGE in another folder?
- index.php file keeps redirecting to a non-existent index.html file?
- Redirect loop upon installation of my plugin
- WordPress directories not writable after PHP version upgrade
- wp_login_url always redirects me to wp-admin
- How can I improve and optimise my wordpress web server for better performance in 2023
- How to fix ‘Notice: Undefined index:’ in PHP form action
- How to restrict page access to logged-in users?
- Changing layout with wp_customise
- Hacked WordPress website /Homepage redirect [closed]
- Add value to new attribute inside WordPress menu items
- Custom URL for multiple categories hierarchy
- Need help with format of nested array in MySQL
- how to manipulate HTML parameters using PHP conditions
- Adding Custom JQuery Menu Fresh Slide Out