htaccess用于为子域上托管的应用程序创建干净的URL

时间:2016-05-09 10:50:18

标签: php apache .htaccess redirect mod-rewrite

以下是此应用程序生成的URL的一些示例。我想使用htaccess:

使网址干净

示例:http://subdomain.domain.com/index.php?folder=abc&file=xyz&variable1=pqr&variable2=123

最终的网址应该像: http://subdomain.domain.com/abc/xyz/pqr 基本上所有参数都应出现在正斜杠之后。

请帮忙!

1 个答案:

答案 0 :(得分:0)

你可以看看in this topic

RewriteEngine On
RewriteBase /
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ index.php?folder=$1&file=$2&variable1=$3
相关问题