The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
<?php namespace Phpcmf\Controllers;
class Go extends \Phpcmf\Common
{
public function index() {
echo file_get_content(SITE_URL.'go.php?id='.intval($_GET['id']));exit;
}
}
可以,這個只能寫在服務器的偽靜態(tài)配置里面去了,說說你的服務器是什么,每一個服務器配置不一樣
回復@官方研發(fā)實習技術
謝謝,麻煩您看下下面錯在哪里?
在.htaccess 這樣寫
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !.(js|ico|gif|jpe?g|bmp|png|css)$ /index.php [NC,L]
RewriteRule ^/go/([0-9]+)$ /go.php?id=$1
在rewrite.php這樣寫
"go\/([0-9]+)" => "go.php?id=$1", //【獨立模塊測試規(guī)則】模塊內容頁
// 獨立模塊測試規(guī)則---解析規(guī)則----結
訪問http://localhost:81/go/760還是報錯了
沒有放對地方
回復@奮斗的犀牛 加在這個位置,全站報錯了
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Internal Server Error
這個錯誤表示。htaccess里面的內容寫錯了
回復@黑蘋果 這個加上去還是報一樣的錯
Internal Server Error
回復@ibuc2t
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^go/([0-9]+)/$ /go.php?id=$1
RewriteRule !.(js|ico|gif|jpe?g|bmp|png|css)$ /index.php [NC,L]
這樣寫,還是一樣報錯
試一試這種
回復@官方研發(fā)實習技術 這樣子不報錯了,但是無效果
htaccess文件不要改了,我也運行不出來
改config/rewrite.php
新建

回復@官方研發(fā)實習技術
還是不行,我把GO相關的頁面放出來共您參考
頁面一:
/go.php
頁面二:
\dayrui\My\Api\go.php
有了上面兩個頁面,
可以正常訪問:
http://localhost:81/go.php?id=760
然后試了上面大家熱心的建議,還是不能實現(xiàn)偽靜態(tài)
http://localhost:81/go/760 訪問
rewrite.php 規(guī)則已經(jīng)試過如下:
也都不行
改config/rewrite.php
新建

補充上面
http://localhost:81/go/760
訪問提示如下:
新建控制器做偽靜態(tài)就行了,官方的方案最佳
回復@官方研發(fā)實習技術
已增加規(guī)則
已增加 文件\dayrui\Core\Controllers\go.php"
仍然報錯 應用程序(go)不存在
你這個是銘文規(guī)則需要寫在最前面
1、規(guī)則寫前面,
2、 文件\dayrui\Core\Controllers\go.php 改成 Go.php,首字母大寫
老用戶告訴你,二次開發(fā)一定不要改系統(tǒng)的文件
回復@官方研發(fā)實習技術
現(xiàn)在不報錯了,但是http://localhost:81/go/760網(wǎng)頁是空白的,是不是因為RUL里面沒有ID了,頁面get不到id?
回復@成繼 沒有改過系統(tǒng)問題,都是新增的自定義入口程序
你這里沒有寫輸出的文字,當然是一片白白色了
回復@心愿未了
這樣輸出也是空白
你不會php嗎,怎么可以這樣寫html啊
回復@易學習
真不會PHP,只會html,謝謝
感謝各位大神的熱心、耐心解答
謝謝
回復@易學習 請問要給這個頁面能否指定模板名稱為go.html,要怎樣寫呢?
http://help.xunruicms.com/206.html 手冊有現(xiàn)成的,基礎而已