2016-11-23 120 views
0

如何将这个网址重写URL

其Opencart的网址

"index.php?route=account/profile"改写这个"profile.php?id=any user id"

我已经试过这首

RewriteRule ^profile.php$ index.php?route=account/profilex [L]

然后

RedirectMatch 301 profile.php(.*) profile.php?id=1/$1

回答

0

下面的htaccess规则应该工作:

RewriteEngine On RewriteRule ^index.php?route=account/(.+)$ profile.php?id=$1 [L]

+0

即使我有 的index.php路线=账户/账号 的index.php路线=帐户/简要X 的index.php? ?route = account/profile – sirsanta

+0

对不起,我无法理解你的问题。 – pioneerb64

+0

我有这些名字的另一页 – sirsanta