1

如何使用 HTACCESS 重定向:
http://www.domain.com/emailreader/10/15/abc

http://www.domain.com/emailreader.php?a=10&b=15&c=abc

4

2 回答 2

1

通过启用 mod_rewrite 和 .htaccess httpd.conf,然后将此代码放在您.htaccessDOCUMENT_ROOT目录下:

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteRule ^(emailreader)/([^/]+)/([^/]+)/([^/]+)/?$ /$1.php?a=$2&b=$3&c=$4 [L,NC,QSA]
于 2012-12-16T09:40:57.533 回答
0

我想这样的事情

RewriteRule ^emailreader/([0-9]+)/([0-9]+)/([a-z]+)$ /emailreader.php?a=$1&b=$2&c=$3 [NC,L]
于 2012-12-16T09:40:24.207 回答