Skip to content
Advertisement

Tag: url-rewriting

Issues when using WordPress rewrite rules then accessing parameter using get_query_var

I’m developing a WP plugin and have a WordPress URL: (e.g.: http://localhost/testsite1/coder/?id=66), and have attempted to add a rewrite rule to http://localhost/testsite1/coder/66/ using the following rule: I have registered a WP Query Var using: but when at URL http://localhost/testsite1/coder/66/, when I run code echo get_query_var(‘id’); nothing is displayed however when at URL http://localhost/testsite1/coder/?id=66 the echo statement will display 66. What

How to know why a 301 redirect occurred in a PHP application in IIS?

IIS logging has logged that a specific GET request as been redirected. Here is the relevant entry (ip address removed): 2021-10-06 02:48:59 xx.xx.xx.xx GET /test – 80 – xx.xxx.x.xxx Mozilla/5.0+(Windows+NT+6.1;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/93.0.4577.82+Safari/537.36 – 301 0 0 1 The application /test consists of a single index.php file that echo’s the word ‘hello’. There are no url redirect rules set up in IIS. Nor

Remove the .php extension on all pages (NGINX)

Having tried all the solutions on Stack, I was not able to remove the .php extension. I managed to make the URLs accessible: www.mydomain.com/login but the user can always change the URL to www.mydomain.com/login.php and I’d like to avoid that. Here is a part of my config : Answer This might be what you’re looking for For .html extensions you

Advertisement