2013-08-28 94 views
2

我想为我的社交网络友好的URL,我使用phpDolphin脚本 这是一个示例配置文件链接http://sample.com/index.php?a=profile&u=admin 我想使个人资料网址是这样http://sample.com/admin友好的URL的.htaccess

我htaccess文件

RewriteEngine on 
RewriteCond %{request_filename} -f 
RewriteRule ^(.*) $1 [L] 
RewriteRule ^(([^/]*)+)(/([^/]{0,32})(/.+)?)?$ index.php?a=$1&q=$3 [L] 

回答

1

这种替换代码:

Options +FollowSymLinks -MultiViews 
# Turn mod_rewrite on 
RewriteEngine On 
RewriteBase/

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^([^/.]+)/?$ index.php?a=profile&u=$1 [L,QSA] 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^(([^/]*)+)(/([^/]{0,32})(/.+)?)?$ index.php?a=$1&q=$3 [L,QSA] 
+0

,我得到了它,但你能告诉我用W这个用户它没有工作? – anubhava

+0

所有用户!例如http://frds.tk/leader3这个链接是另一个用户,这不是管理员!你会发现这个链接打开了管理员配置文件!不是leader3个人资料 –

+0

啊有错别字,请立即试用。 – anubhava