English 中文(简体)
Mod rewrite在改写法规则中用斜es赢得 t。
原标题:Mod rewrite won t work with slashes in rewrite rules

Stack,

我今天和昨天都把我的头发拉开,试图把我所讲的 mo死一谈。

I m running an ubuntu lamp server and I ve gotten mod_rewrite turned on and working for simple rewrites such as:

RewriteRule ^link([^/]*).html$ rewrite.php?link=$1 [L]

但是,每当我试图改写陶器,把我充满活力的陶器变成更清洁的静坐视镜IE时:

random/5000/ to random.php?id=5000

mo泥无法重写变量。 然而,如果我提出以下规则,它就发挥了作用:

random5000.html to random.php?id=5000

它认为,像变造者一样,根本不能接受我的改写规则中的冲突。

这里,我改写的统治就是这样。

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^random/([0-9]+)$ random.php?id=$1
问题回答

I haven t tested this but maybe your RewriteRule should look like this:

RewriteRule ^random/([0-9]+)/$ random.php?id=$1

(/ at the end)。 如果它失败,请补充说明。





相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签