I recently developed a video teaching system and used apache + php + mysql environment locally for development. I have not encountered any redirection problem. I only need to configure it in the apache environment. 1. httpd. the mod_rewrite.so module is loaded in the conf configuration file. 2. change AllowOverrideNone to None to All.
I recently developed a video teaching system and used apache + php + mysql environment locally for development. I have not encountered any redirection problem. I only need to configure it in the apache environment.
1. the mod_rewrite.so module is loaded in the httpd. conf configuration file.
2. change AllowOverride None to All
3. make sure that URL_MODEL is set to 2.
4. Save the following content as a. htaccess file and put it under the same directory of the entry file
- RewriteEngine on
- RewriteCond % {REQUEST_FILENAME }! -D
- RewriteCond % {REQUEST_FILENAME }! -F
- RewriteRule ^ (. *) $ index. php/$1 [QSA, PT, L]
However, this configuration will cause errors in iis because iis does not read. htaccess. download ISAPI_Rewrite3_0073.msi from the Internet and click install according to the Wizard.
Enable ISAPI_Rewrite
Delete the default rule. Otherwise, an error will occur! Edit ---> delete a rule.
In this way, the. load heaccess file is implemented.
However, the official trial period of this software is only 45 days, which means it will not work after 45 days. how can we work? The best solution is
1. stop iis.
2. overwrite the dll file in the Rewrite cracking folder to ISAPI_Rewrite.dll and ISAPI_RewriteSnapin.dll in the installation directory. if you are prompted to use the file, rename the dll file to be overwritten and copy it;
3. open the httpd. conf file in the installation directory, enter the following content and save the file, so there is no limit on the number of days to use;
RegistrationName = wlqcwin
RegistrationCode = 2EAD-35GH-66NN-ZYBA
4. after installation, remember to grant the read permission to the network service in the ISAPI_Rewrite3 software installation directory.
5. start iis.