0
我喜欢重写URL,但我的.htaccess中的规则不匹配。 .htaccess位于“foo”文件夹中。mod_rewrite - 参数文件夹
有两种类型的网址:
http://www.domain.com/foo/Fgh34R #Always 6 Chars after the "/" A-Za-z0-9
#should be redirected to
http://www.domain.com/foo/index.php?s=Fgh34R
http://www.domain.com/foo/http://www.google.com
#should be redirected to
http://www.domain.com/foo/index.php?u=http://www.google.com
这是我的.htaccess至今:
RewriteEngine On
RewriteRule ^\/(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?$ index.php?u=$1
RewriteRule ^\/([A-Za-z0-9]{0,6})$ index.php?s=$1
任何人可以帮助我吗?
谢谢,但我编辑了我的问题。我忘记了路径中的一个文件夹(“foo”)。抱歉。你能再看一次吗?谢谢。 – alexP
@alexP我更新了它。 – hwnd