
phpStudy開啟Apache重寫模塊(開啟偽靜態)
掃描二維碼訪問該頁面
掃描二維碼訪問該頁面
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的所有服務。
? 上一篇:
下一篇 ?:
- 相關文章:
IIS環境使用phpstudy (2018-12-18 9:33:3)
發表留言