我不知道如何解釋,我想要什麼,但從我認爲你知道的例子。 一刻我的註冊鏈接:Url參數重定向
example.com/pages/registration.php
,但我想開這個鏈接我和registration.php:
example.com/registration
我怎樣才能做到這一點?或者我可以在哪裏瞭解它,以及如何調用它?
感謝
我不知道如何解釋,我想要什麼,但從我認爲你知道的例子。 一刻我的註冊鏈接:Url參數重定向
example.com/pages/registration.php
,但我想開這個鏈接我和registration.php:
example.com/registration
我怎樣才能做到這一點?或者我可以在哪裏瞭解它,以及如何調用它?
感謝
使用以下重定向的.htaccess文件
RewriteCond %{REQUEST_URI} /registration
RewriteRule ^registration ./pages/registration.php [L]
可以實現,使用正常的頭重定向。
打開文件...
`example.com/pages/registration.php`
在該文件的頂部只需添加幾行:
<?php
header('location: example.com/registration');
exit;
這就是我的想法 –
THX。我認爲很好。但是,如果isset('registration') ?我該如何檢查php? THx –
我們沒有通過任何事情,那我們怎麼來檢查那裏,如果你必須通過查詢字符串。 – Sasikumar