2010-09-04 51 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