How to rewrite url wordpress?

You should hook add_rewrite_rule() into init Assuming http://local/rieltplus/ is your homepage, and category/catalog/ is a category archives, this should work: add_action(‘init’, function() { add_rewrite_rule( ‘category/catalog/([^/]+)?$’, ‘index.php?category_name=catalog&type=$matches[1]&price_min=1000&price_max=2000&area_min=5&area_max=50&room_num=5&etage=2&plan=old’, ‘top’ ); }); If you want to make that available to any category then mention it in the comments. By the way, local/rieltplus/category/catalog/TYPE&price_min is not a valid URL, unlike … Read more

Moving from http to https, and www. to non-www URL

Add the following to your .htaccess.. # force https on the front of the site RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] ref https://stackoverflow.com/questions/4398951/force-ssl-https-using-htaccess-and-mod-rewrite if on nginx the advice is for the following.. server { listen 80; server_name yoursite.com www.yoursite.com; return 301 https://yoursite.com$request_uri; } refer to http://www.wpbeginner.com/wp-tutorials/how-to-add-ssl-and-https-in-wordpress/ for other areas such as the … Read more

get_template_directory_uri cached?

Caching is not your problem here. The home URL and site URL are stored in the wp_options table in your database. You can update them either by visiting the Settings > General page in your WordPress dashboard, or you can edit the siteurl and home option values directly in the database through an SQL query … Read more

WordPress URL redirect

This is quite possible. First off, Making pagename/{customString} resolve as the page itself instead of 404, then, you’re free to decide whether to keep the URI as is and serve the page content, or redirect back somewhere e.g page permalink ( get_the_permalink() ): add_action( “init”, function(){ $pagename = “pagename”; // page slug add_rewrite_rule( sprintf(‘^%s/([^/]*)/?’, $pagename), … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)