Many people have always criticized this combination of IIS and Wordpress, mainly because IIS is too weak in URL rewrite. I really don't know what Microsoft thinks !! A Web server platform does not support URL rewriting !!
This time, I migrated my blog platform and encountered the same problem. After searching the Internet, I found this perfect solution, that is, using IIS's ISAPI method.
There is a foreigner (foreigners are more involved in this aspect, hey, the key isFree Spirit), Released this ISAPI plug-in, address in http://www.binaryfortress.com/wordpress-url-rewrite.
In addition, we provide free forum support, which is awesome.
The latest version is 1.1 and 1.0 is the same. Only the difference lies in whether the VC Runtime Library is required. 1.0 The vc2005 Runtime library needs to be installed separately, and 1.1 is not required.
After downloading and decompress the package, you can see that there are four files in it:
Here, the TXT file is the description file, which has no actual use; The INI file is the configuration file for rewriting rules; the two DLL files are used by 32-bit and 64-bit systems respectively. Because I am a 32-bit system, I can choose wordpressurlrewrite32.dll.
Open IIS manager, locate the website, right-click Properties, and switch to the ISAPI Filter tab:
Click "add", Filter Name, and enter a Filter Name. Browse to the DLL file and click "OK.
Then, open the wordpressurlrewrite. ini file and check whether the rules in the file are suitable for you. modify the rules as needed.
After confirmation, restart IIS or your computer. After the restart, go to the ISAPI filter and see
The green arrow indicates that the ISAPI extension has been added successfully. Go to the WordPress background and goSet ---> Fixed Link, Set your own fixed link format, save.
Now, you can visit your website to see if it takes effect.