mod_rewrite给我404 [英] mod_rewrite gives me 404
本文介绍了mod_rewrite给我404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想重写链接,例如
index.php?page=entry&id=15&action=edit
到entry/15/edit
.
这就是我的.htaccess现在的样子:
I wanna rewrite links like
index.php?page=entry&id=15&action=edit
to entry/15/edit
.
This is how my .htaccess looks like now:
# Turn the Rewrite engine on
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
# Rewrite rules
RewriteRule ^([^/]*)(/([^/]*)/?)([^/]*)?$ index.php?page=$1&id=$2&action=$3 [QSA,L]
给我404.
出什么问题了?
推荐答案
括号太多.您可能感染了Lisp.
Too many parentheses. You might have a Lisp infection.
尝试:
RewriteRule ^([^/]*)/([^/]*)/?([^/]*)?$ index.php?page=$1&id=$2&action=$3 [QSA,L]
这篇关于mod_rewrite给我404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文