Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SPOSTARBUST_Widget_Class has a deprecated constructor in /home2/cptech/public_html/wp-content/plugins/spostarbust/index.php on line 386

Deprecated: Function create_function() is deprecated in /home2/cptech/public_html/wp-content/plugins/spostarbust/index.php on line 611

Notice: The called constructor method for WP_Widget in SPOSTARBUST_Widget_Class is deprecated since version 4.3.0! Use
__construct()
instead. in /home2/cptech/public_html/wp-includes/functions.php on line 4514
Add a training slash for nginx websites | A cPanel Tech

Add a training slash for nginx websites

In Nginx web servers, most of us might have came across a situation where our sub folder access wont work some times and if we add a trailing slash , it start to work
ie
http://domain.com/sub-folder  wont work
when http://domain.com/sub-folder/  works.

Fix add a redirect rule to auto insert the trailing slash – here is the code for that

rewrite ^/([^.]*[^/])$ $1/ permanent;

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu