2010-09-04 63 views
0

pre_config_step_2.php?類型=雜貨&計數= 2車削此字符串modwrite

/pre_config_step_2 /雜貨/ 2

我是否需要改變htaccess的在根目錄中並如果是的話我怎麼將其更改爲

回答

1
<IfModule mod_rewrite.c> 
    RewriteEngine On 

    RewriteRule ^pre_config_step_2/(\w+)/(\d+)$ pre_config_step_2.php?type=$1&count=$2 
</IfModule> 

這會考慮訪問/pre_config_step_2/Grocery/2彷彿請求pre_config_step_2.php?type=Grocery&count=2

+0

這裏是鏈接 http://posnation.com/pre_config/pre_config_step_2/Grocery/1 和它不工作 – Trace 2010-09-04 15:05:59

+0

你在哪裏把.htaccess文件?另外,你確定你有一個工作mod_rewrite的支持? (要檢查,將'RewriteEngine'改爲'RewriteEngineBlabla',看看它是否發出'500內部服務器錯誤') – aularon 2010-09-04 15:18:28

+0

好像有一個.httaccess文件,裏面充滿了public_html文件夾根目錄中的大量內容,文件有 這裏是什麼在那裏,現在 RewriteEngine敘述上 選項的例子+的FollowSymLinks -Indexes從安全網站 的RewriteCond%{SERVER_PORT}^$ 443重寫規則 ^ $的robots.txt #潘基機器人/robots_ssl.txt [L] RewriteRule^pre_config_step_2 /(\ w +)/(\ d +)$ pre_config_step_2.php?type = $ 1&count = $ 2 #force miva https登錄 RewriteCond%{HTTPS} off – Trace 2010-09-04 15:24:09