legalHQWithNewAddressTable

legalHQWithNewAddressTable

免责声明:我对URL重写一无所知

目前我的网址看起来像

legalHQWithNewAddressTable/legalHQ/public/admin/Parties.php?caseid=7 (any number basically)

但是我如何使其看起来像以下
legalHQWithNewAddressTable/legalHQ/public/admin/Parties/caseid/7/

我正在尝试但无法使用RewriteRule ^([a-zA-Z0-9]+)/?
请不要使事情变得复杂,我对URL重写一无所知,因此请使其尽可能简单。

任何想法?

最佳答案

将此规则放在/legalHQWithNewAddressTable/legalHQ/public/admin/.htaccess中:

Options -MultiViews
RewriteEngine On
RewriteBase /legalHQWithNewAddressTable/legalHQ/public/admin/

RewriteRule ^Parties/caseid/([0-9]+)/?$ Parties.php?caseid=$1 [L,QSA,NC]

关于regex - .htaccess文件我无法正常运行,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24701569/

10-09 12:32