现有静态网页改成动态网页怎么做?
导读:本文共719.5字符,通常情况下阅读需要2分钟。同时您也可以点击右侧朗读,来听本文内容。按键盘←(左) →(右) 方向键可以翻页。
摘要:伪静态实现的原理就是 index.php?act=about&cid=1 将这种形式的动态路径用 about-1.html 这种形式输出,根据不同的服务器环境,配置方法也不太一样,PHP+iis6的话就要配置httpd.ini文件,php+iis7就要配置web.config,PHP+apache就要配置.htaccess文件.htaccess规则示例:RewriteEngine on R... ...
目录
(为您整理了一些要点),点击可以直达。伪静态实现的原理就是 index.php?act=about&cid=1 将这种形式的动态路径用 about-1.html 这种形式输出,根据不同的服务器环境,配置方法也不太一样,PHP+iis6的话就要配置httpd.ini文件,php+iis7就要配置web.config,PHP+apache就要配置.htaccess文件.htaccess规则示例:RewriteEngine on RewriteRule ^/?(index|guestbook|online).html$ index.php [L]RewriteRule ^/?(eindex).html$ index.php?act=$1 [L]RewriteRule ^/?(index|guestbook|online)-([0-9]+).html$ index.php\?p=$2 [L]RewriteRule ^/?([a-z0-9]+)_([0-9]+).html$ index.php\?act=$1&id=$2 [L]RewriteRule ^/?([a-z0-9]+)-([0-9]+).html$ index.php\?act=$1&cid=$2 [L]RewriteRule ^/?([a-z0-9]+)-([0-9]+)-([0-9]+).html$ index.php\?act=$1&cid=$2&p=$3 [L]httpd.ini示例:[ISAPIRewrite]RepeatLimit 32# Block external access to the httpd.ini and httpd.parse.errors filesRewriteRule /httpd(?:.ini|.parse.errors). / [F,I,O]# Block external access to the Helper ISAPI ExtensionRewriteRule ..isrwhlp / [F,I,O]RewriteRule ^/(index|guestbook|online).html$ /$1.php RewriteRule ^/(eindex).html$ /index.php\?act=$1 RewriteRule ^/(index|guestbook|online)-([0-9]+).html$ /$1.php\?p=$2 RewriteRule ^/([a-z0-9]+)([0-9]+).html$ /index.php\?act=$1&id=$2 RewriteRule ^/([a-z0-9]+)-([0-9]+).html$ /index.php\?act=$1&cid=$2 RewriteRule ^/([a-z0-9]+)-([0-9]+)-([0-9]+).html$ /index.php\?act=$1&cid=$2&p=$3
现有静态网页改成动态网页怎么做?的详细内容,希望对您有所帮助,信息来源于网络。