创建.htaccess重写规则与wordpress相同


Create .htaccess Rewrite rule same as wordpress

我正在创建。htaccess中的重写规则

我有一些问题,我正在创建像wordpress这样的规则,但我没有得到正确的

我写的规则在下面

`RewriteRule projectDir/(.*)/(.*)/(.*)$ index.php?module=$1&action=$2&id=$3`

在这个ReFacta是我的项目目录

Url,我希望它和下面的一样

`http://localhost/projectDir/user/edit/5`

朋友们,你们知道吗?

你几乎是正确的。你的代码有什么问题,你没有指定RewriteBase

Options +FollowSymLinks
RewriteEngine on
RewriteBase /projectDir
RewriteRule ^(.*)/(.*)/(.*)$ /index.php?module=$1&action=$2&id=$3 [L]