我想使用国防部重写与h
查询字符串以下动态URL重定向:重定向到刚刚查询字符串
https://eu1.domain.com/~username/test.php?h=String_112016
以下URL没有test.php
部分:
https://eu1.domain.com/~username/String_112016
我在我的htaccess文件中尝试了以下内容,但它得到404:
RewriteEngine On
RewriteRule ^\~username/([^/]*)$ /~username/test.php?h=$1 [L]
我在htaccess文件中没有任何其他规则。
从你写的代码看,你看到的并不是重定向。当用户请求https://eu1.domain.com/~username/String_112016时,您希望test.php页面以作为参数h发送的“String_112016”呈现...是否正确? – VKK
是的,正好VKK :) –