0
我正在嘗試使用htaccess進行重定向,但不知何故,這似乎不起作用。解析FQDN背後的所有變量作爲變量
我想拿起一切完全限定域名後面,解析它作爲一個變量到PHP,使我的URL的樣子:
https://example.com/?abc.com
在後臺它應該做的:
https://example.com/index.php?url=abc.com
類似的東西我已經在做另一個鏈接,但不知何故,這似乎並沒有工作。
RewriteRule ^(.+)$ https://example.com/index.php?url=$1 [L]
我在做什麼錯在這裏,我開始懷疑這個心不是可能
可悲的是不工作。它會把大量的index.php?url =後面的fqdn 'https://example.com/index.php?url=index.phpurl=index.phpurl=index.phpurl=index.phpurl=index。 phpurl = index.phpurl = index.phpurl = index.phpurl = index.phpurl = index.phpurl = index.phpurl = index.phpurl = index.phpurl = index.phpurl = index.phpurl = index.htmlabc.com' – RvdM
I在代碼中添加對文件和目錄的測試 – Croises