URL Rewrite requires server support! Before enabling this setting, please make sure that the correct settings have been made on the server. For the setting method, please refer to the "Setting Method under Apache" and "Setting Method under IIS" below!
Setting method under Apache
Copy the code The code is as follows:
Open the configuration of Apache File httpd.conf .
Remove the # in front of #LoadModule rewrite_module modules/mod_rewrite
Add in httpd.conf:
RewriteEngine On
#RewriteCond %{ENV:SCRIPT_URL} (?:index|dispbbs)[-0-9]+.html
RewriteRule ^(.*?(?:index|dispbbs))-([-0-9]+).html$ $1.php? __is_apache_rewrite=1&__rewrite_arg=$2
To implement the mapping of asp post URL to php post, in the third step, between and Add:
RewriteMap tolowercase int:tolower
RewriteCond %{QUERY_STRING} (?:boardid|page|id|replyid|star|skin)=d+ [NC]
RewriteRule ^(.*(?:index |dispbbs)).asp$ $1.php?${tolowercase:%{QUERY_STRING}}&__is_apache_rewrite=1
Save httpd.conf and restart Apache.
http://www.bkjia.com/PHPjc/317645.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/317645.htmlTechArticleURLRewrite requires server support! Before enabling this setting, please make sure that the correct settings have been made on the server. For setting methods, please refer to the "Setting Method under Apache" and "...