【发布时间】:2015-02-08 16:02:03
【问题描述】:
朋友们,我是 php 开发者,我在示例中自定义了 url
发件人:http://example.net/page.php?post_id=contact/
收件人:http://example.net/contact/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#RewriteBase use only home/phtml/www/ this kind of path
RewriteRule ^([a-zA-Z-/]+)$ page.php?post_id=$1 [QSA]
RewriteRule ^([a-zA-Z-/]+)/$ page.php?post_id=$1 [QSA]
</IfModule>
它在上面的 htaccess 代码上工作正常,但它有一些问题。什么是用于控制面板目的的“admin”文件夹。其中如何正确重定向到http://example.net/admin/ htaccess 中的任何选项?
我的错误是:http://example.net/page.php?post_id=admin/
如何解决?
【问题讨论】:
标签: regex apache .htaccess url-rewriting friendly-url