phpStudy开启Apache重写模块(开启伪静态)
phpStudy开启Apache重写模块(开启伪静态)

扫描二维码访问该页面

7年前 网站建设 1183 15133

pbootcms开启伪静态后地址栏不再包含 index.php,开启步骤如下:

一、IIS环境:
1、安装rewrite组件;
2、修改程序config/config.php文件 url_type=2
3、在站点目录建立web.config文件(默认已有,去除后缀bak即可),规则如下;
<rewrite>
   <rules>
       <rule name="reIndex" stopProcessing="true">
           <match url="^(.*)$" ignoreCase="true" />
               <conditions logicalGrouping="MatchAll">
                  <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                  <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
               </conditions>
               <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
       </rule>
   </rules>
</rewrite>

二、Apache环境:
1、开启Apache重写模块,具体请百度;
2、修改程序config/config.php文件 url_type=2
3、在站点目录建立.htaccess文件(默认已有),内容如下:
<IfModule mod_rewrite.c>
   Options +FollowSymlinks
   RewriteEngine On
       
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
  
   #如果页面出现"No input file specified." 请注释第一条,启用第二条
   RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
   #RewriteRule ^(.*)$ index.php [E=PATH_INFO:$1,QSA,PT,L]  
</IfModule>

学习笔记

PHPStudy开启rewrite_module重写功能启用.htaccess

1、开启rewrite_module

鼠标左键点击PHPStudy的 其他选项菜单,在PHP扩展及设置->Apache模块找到rewrite_module,点击即开启本模块。PHPStudy会自动重启服务。

 

2、修改httpd.conf文件

在 其他选项菜单->打开配置文件->httpd.conf,点击即可打开httpd.conf文件。

找到:

AllowOverride None

修改为:

AllowOverride All

然后重启PHPStudy的所有服务。 

0

评论列表

游客  5个月前 回复该评论
东方不败外加灭绝师太啊!http://iylds.xaqrpj.com.cn
游客
这么好的帖子,应该加精华!http://67pi9.https://www.telegramem.com
TG涓枃鐗?
TG涓枃鐗堢綉绔?
TG涓枃鐗堝畼缃?
TG涓枃鐗堝畼鏂圭綉绔?
Telegr
楼主练了葵花宝典吧?http://i61.https://www.telegramis.com
Telegram涓枃鐢佃剳瀹樼綉
游客  5个月前 回复该评论
吹牛的人越来越多了!http://38a37d.https://www.weimaitu.com/
游客
游客  5个月前 回复该评论
青春不在了,青春痘还在!https://weibo.com/tv/show/1034:5078563796484117
游客
游客  5个月前 回复该评论
帖子很有深度!https://weibo.com/tv/show/1034:5078555529248885
游客
游客  5个月前 回复该评论
终于看完了,很不错!https://weibo.com/tv/show/1034:5079530780426257
游客
游客  5个月前 回复该评论
白富美?高富帅?https://weibo.com/tv/show/1034:5079983186706467
游客
祖国尚未统一,我却天天灌水,好内疚!http://yqy6.https://www.telegramlp.com/
telegram中文网站
好东西,赞一个!http://fjpz2.https://www.telegramis.com/
telegram中文电脑版官方网站
收藏了,怕楼主删了!http://apn.https://www.telegramlp.com/
telegram中文官方网站
游客  5个月前 回复该评论
信楼主,考试不挂科!https://www.msl.wang/sitemap/zjmoretags_1.xml
游客
看了这么多帖子,第一次看到这么高质量内容!https://www.telegramem.com/
Telegram官方网站
Telegram官网  5个月前 回复该评论
楼主的文笔不错!https://www.telegramem.com/
Telegram官网
我只看看不说话。。。http://4p7.https://www.telegramlp.com/
telegram中文官网
telegram网站  5个月前 回复该评论
态度决定一切,不错!http://g3i02.https://www.telegramis.com/
telegram网站
Telegram下载  5个月前 回复该评论
楼主是一个典型的文艺青年啊!https://www.telegramis.com/
Telegram下载
游客  5个月前 回复该评论
在这个版块混了这么久了,第一次看见这么给你的帖子!https://www.miaoxiawang.com/down/7067.html
游客
楼主很有激情啊!http://o18b.https://www.telegramis.com/
telegram中文官网
Telegram中文版  5个月前 回复该评论
我和我的小伙伴都惊呆了!https://www.telegramxp.com/
Telegram中文版
管它三七二十一!http://t9swbe.https://www.telegramlp.com/
telegram中文电脑官网
telegram网站  5个月前 回复该评论
这么版块的帖子越来越有深度了!http://iro3n.https://www.telegramis.com/
telegram网站
Telegram下载  5个月前 回复该评论
收藏了,很不错的内容!https://www.telegramxp.com/
Telegram下载
看在楼主的面子上,认真回帖!http://l2rbyq.https://www.telegramis.com/
telegram电脑官网
游客  5个月前 回复该评论
楼主很有激情啊!https://www.miaoxiawang.com/down/7707.html
游客
游客  5个月前 回复该评论
收藏了,楼主加油!https://weibo.com/tv/show/1034:5059665432870992
游客
telegram网站  5个月前 回复该评论
好帖子!http://ggu.https://www.telegramis.com/
telegram网站
楼主的帖子越来越有深度了!http://8h0nx.https://www.telegramlp.com/
telegram中文官方网站
网站做得不错http://11ntb.https://www.telegramlp.com/
telegram中文电脑版网站
楼主的头像是本人吗?http://l5v9.https://www.telegramis.com/
telegram官方网站
有机会找楼主好好聊聊!http://nro7ov.https://www.telegramlp.com/
telegram电脑官方网站
skype官网  5个月前 回复该评论
不错哦,楼主这是要火的节奏啊!http://jxr23j.https://www.skypeis.com/
skype官网
skype官网  5个月前 回复该评论
收藏了,改天让朋友看看!http://xrzz.https://www.skypeis.com/
skype官网
游客  5个月前 回复该评论
这么好的帖子,应该加精华!https://www.miaoxiawang.com/down/7496.html
游客
游客  5个月前 回复该评论
好帖子!https://www.miaoxiawang.com/down/7691.html
游客
好东西,赞一个!http://vpef.https://www.telegramis.com/
telegram中文版网站
Telegram中文版  5个月前 回复该评论
看帖、回帖、拿分、走人https://www.telegramxp.com/
Telegram中文版
skype官网  5个月前 回复该评论
论坛人气好旺!http://dkh5.https://www.skypeis.com/
skype官网
楼主是在找骂么?http://3xpab7.https://www.skypeis.com/
skype电脑版官网
skype电脑版  5个月前 回复该评论
收藏了,怕楼主删了!http://38vc.https://www.skypeis.com/
skype电脑版
Telegram下载  5个月前 回复该评论
网站做得不错https://www.desktoptg.com/
Telegram下载
Telegram  5个月前 回复该评论
勤奋灌水,天天向上!https://www.desktoptg.com/
Telegram
telegram官网  4个月前 回复该评论
刚看见一个妹子,很漂亮!http://mnm.https://www.telegramis.com/
telegram官网
坚持回帖!http://gkg36.https://www.telegramis.com/
telegram电脑版官方网站
楼主很有激情啊!http://fnez2s.https://www.telegramis.com/
telegram中文官网
好东西,学习学习!http://r85.https://www.telegramlp.com/
telegram中文电脑版官网
skype官网  4个月前 回复该评论
论坛的人气不行了!http://1l3l.https://www.skypeis.com/
skype官网
今天过得很不爽!http://mit.https://www.telegramlp.com/
telegram中文电脑版
游客  4个月前 回复该评论
顶一个!https://www.gumua.com/pcsoft/131656.html
游客
skype电脑版  4个月前 回复该评论
经典,收藏了!http://aa46j.https://www.skypeis.com/
skype电脑版
赞一个!http://4a4d3y.https://www.telegramis.com/
telegram中文版官网
看帖不回帖都是耍流氓!http://xpos.https://www.skypeis.com/
skype电脑版网站
很经典,收藏了!http://8xcedn.https://www.telegramlp.com/
telegram电脑官网
缺乏激情了!http://5136.https://www.skypeis.com/
skype电脑版官网
游客  4个月前 回复该评论
我对楼主的敬仰犹如滔滔江水绵延不绝!https://m.gumua.com/use/130031.html
游客
楼主的帖子实在是写得太好了。文笔流畅,修辞得体!http://k556i.https://www.telegramlp.com/
telegram电脑版官方网站
最近回了很多帖子,都没人理我!http://oq6tub.https://www.skypeis.com/
skype电脑版网站
楼主的帖子实在是写得太好了。文笔流畅,修辞得体!http://6bdlq.https://www.skypeis.com/
skype电脑版官方网站
观点鲜明,立场坚定,作者态度明确。http://uoy4.https://www.telegramis.com/
telegram电脑版官网
skype电脑版  4个月前 回复该评论
楼上的说的很多!http://80b.https://www.skypeis.com/
skype电脑版
游客  4个月前 回复该评论
鉴定完毕!https://telegratm.com/?p=13603
游客
有内涵!http://j6q8.https://www.telegramlp.com/
telegram中文版官方网站
游客  4个月前 回复该评论
林子大了,什么鸟都有了啊!https://telegratm.com/?p=13380
游客
游客  4个月前 回复该评论
态度决定一切,不错!https://telegratm.com/?p=13159
游客
游客  4个月前 回复该评论
今天过得很不爽!https://telegratm.com/?p=13517
游客
楼上的别说的那么悲观好吧!http://77y405.https://www.skypeis.com/
skype电脑版官方网站
游客  4个月前 回复该评论
看帖、回帖、拿分、走人https://telegratm.com/?p=11763
游客
我就搞不明白了,看帖回帖能死人么,居然只有我这么认真的在回帖!https://www.telegramis.com/
telegram中文版网站
游客  4个月前 回复该评论
我只看看不说话。。。https://m.gumua.com/use/130310.html
游客
skype电脑版  4个月前 回复该评论
怪事年年有,今年特别多!https://www.skypeis.com/
skype电脑版
skype官网  4个月前 回复该评论
顶一下,收藏了!https://www.skypeis.com/
skype官网
游客  4个月前 回复该评论
看了这么多帖子,第一次看看到这么有内涵的!https://m.gumua.com/use/132093.html
游客
顶一下,收藏了!https://www.skypeis.com/
skype电脑版官网
skype电脑版  4个月前 回复该评论
看了这么多帖子,第一次看到这么经典的!https://www.skypeis.com/
skype电脑版
skype电脑版  4个月前 回复该评论
学习雷锋,好好回帖!https://www.skypeis.com/
skype电脑版
好东西,学习学习!https://www.skypeis.com/
skype电脑版官方网站
游客  4个月前 回复该评论
支持楼上的!https://www.gumua.com/play/132294.html
游客
十分赞同楼主!https://www.telegramlp.com/
telegram中文版网站
我对楼主的敬仰犹如滔滔江水绵延不绝!https://www.telegramis.com/
telegram官方网站
telegram电脑版  4个月前 回复该评论
看了这么多帖子,第一次看看到这么有内涵的!https://www.telegramlp.com/
telegram电脑版
skype官网  4个月前 回复该评论
很有看点!https://www.skypeis.com/
skype官网
skype电脑版  4个月前 回复该评论
楼主写的很经典!https://www.skypeis.com/
skype电脑版
东方不败还是灭绝师太啊?https://www.skypeis.com/
skype电脑版官网
写的太好啦,评论一个https://www.telegramlp.com/
telegram中文电脑网站
skype电脑版  4个月前 回复该评论
支持一下!https://www.skypeis.com/
skype电脑版
很给力!https://www.telegramlp.com/
telegram中文电脑官方网站
skype电脑版  4个月前 回复该评论
感觉不错!https://www.skypeis.com/
skype电脑版
skype电脑版  4个月前 回复该评论
看了这么多帖子,第一次看到这么有深度了!https://www.skypeis.com/
skype电脑版
楼主是一个神奇的青年!https://www.telegramis.com/
telegram中文电脑版官方网站
telegram中文版  4个月前 回复该评论
顶一个!https://www.telegramis.com/
telegram中文版
论坛的人气越来越旺了!https://www.telegramlp.com/
telegram电脑版官网
最近回了很多帖子,都没人理我!https://www.skypeis.com/
skype电脑版网站
看在楼主的面子上,认真回帖!https://www.telegramlp.com/
telegram中文电脑版
skype电脑版  4个月前 回复该评论
哥回复的不是帖子,是寂寞!https://www.skypeis.com/
skype电脑版
以后要跟楼主好好学习学习!https://www.skypeis.com/
skype电脑版网站
每次看到楼主的帖子都有惊吓!https://www.telegramis.com/
telegram官方网站
楼主的帖子越来越有深度了!https://www.skypeis.com/
skype电脑版网站
刚分手,心情不好!https://www.telegramem.com/
telegram电脑版网站
怎么我回帖都没人理我呢?https://www.telegramem.com/
telegram中文版网站
skype电脑版  4个月前 回复该评论
内容很有深度!https://www.skypeis.com/
skype电脑版

发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。