0
請大家多多包涵我,我怎麼不解釋我的問題,我是新與國防部re_writing我有數據不被使用Ajax和mod_rewrite的獲取
- 兩頁的index.php
- 的search.php
index.php有一個搜索字段和一個div,其中數據是fetch.and搜索字段使用Ajax從數據庫中給出即時結果。即時
爲
搜索領域的結果
當我上的index.php它給我正確的結果,在這裏我使用的是重寫規則果然
http://localhost/user_profiles/index?u=tol
納入
http://localhost/user_profiles/index/u/tol
,並給我的個人資料視圖
兩個網址給我正確的結果,但問題是與阿賈克斯,當IM上
http://localhost/user_profiles/index?u=tol
AJAX完美的作品,並給我正確的結果,但是當我在
http://localhost/user_profiles/index/u/tol
它給出奇怪的結果爲
我無法弄清楚如何在這裏解決它是我的re_write規則
Options +FollowSymLinks
RewriteEngine on
RewriteRule u/(.*) index.php?u=$1 [L,QSA]
的index.php來只指數另一個規則
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
和我的AJAX查詢是
maq.open('GET','search?q='+userVal,true);
請幫幫我。
現在只搜索在http工作://本地主機/ user_profiles /索引/ U/TOL,但不工作對於http:// localhost/user_profiles/index? – Null
@Null看到更新的答案。 – BenM
謝謝你,我非常感謝主席:) – Null