使用localhost apache在mvc php中使用漂亮的url
我的根或索引项目是http://localhost/myapp 如何转换使用localhost apache在mvc php中使用漂亮的url,php,.htaccess,localhost,friendly-url,Php,.htaccess,Localhost,Friendly Url,我的根或索引项目是http://localhost/myapp 如何转换 http://localhost/myapp/index.php?controller=song&id=32&action=edit 到 文件夹c:\php\www\myapp中的我的项目在.htaccess文件中使用以下代码: RewriteRule ^myapp/index.php?controller=song&id=([0-9]+)&action=edit/$ myapp/song
http://localhost/myapp/index.php?controller=song&id=32&action=edit
到
文件夹c:\php\www\myapp中的我的项目在.htaccess文件中使用以下代码:
RewriteRule ^myapp/index.php?controller=song&id=([0-9]+)&action=edit/$ myapp/song/$1/edit [L]
你研究过修改吗?
RewriteRule ^myapp/index.php?controller=song&id=([0-9]+)&action=edit/$ myapp/song/$1/edit [L]