![]() |
|
redirect specific file with hosts - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Computing (https://hackforums.net/forumdisplay.php?fid=88) +---- Forum: Computing Lounge (https://hackforums.net/forumdisplay.php?fid=8) +---- Thread: redirect specific file with hosts (/showthread.php?tid=4774828) |
redirect specific file with hosts - ollie1999tx - Apr 12, 2015 Sorry if this is the wrong section but I couldn't find one more relevant. I have been trying to figure this out for awhile and tried many ways but is there a way to redirect your hosts file to a specific file? Lets say a website with a file name at the end is called (fakewebsite(dot)com/login.php) is the specific url I would like to redirect to from hosts without redirecting to the entire website, is this possible and if not from hosts are there any other ways? * - AMC. - Apr 12, 2015 You can do this by adding the following to your .htaccess file. Code redirect 301 /login.php http://www.example.com/newlogin.phpI think this is what you are asking anyways. If not please elaborate further. |