galapagos77 Posted November 16, 2009 Share Posted November 16, 2009 hey guys, here's an example of what I mean. I want to create a url that will redirect from my page to another page, but without even visiting my page. Example: http://cheaptravel.com/ First ad is something like: cheap travel. Direct URL for the ad is: http://cheaptravel.com/redirect.php?b=U78xdTvmJUo%3D&term=Cheap+Travel&nterms=Q2hlYXAgVHJhdmVs&position=1&odomain=cheaptravel.com&source=1&market=us¤cy=USD&to=aHR0cDovL3JjMTAub3ZlcnR1cmUuY29tL2Qvc3IvP3hhcmdzPTE1S1BqZzElMkQ1U2tKYW13cnlxY3JYTVNlcUh5MVlheGNhNThjcG5CcGR4R3RSZjVpTXhYT1IlNUZaNmZFbWNWN1JPVnh2MVBkelBXUiUyRGFFU0wlNUZQem52eURHd3VQUUZTQUQ3S2gwWTdHeW9NNk52JTJEVFk5QlIxdXdod083dG5JUkxPMzJ5V2w2cU9kJTJEN20lMkQ3YWNaZjBQSGhMNlB4YmpoQ1klNUZ2Sm15Y2V3ek9JV0dheUppVjhxcEFpZE44cFc0TkZjZ01xeUxwb0pTcnRYZTkyUTRTU0FJYzlOeTR4Rm9NQ2xQQ1JrWGk3VTdXcDlvMHpmS1RaNXY2JTVGTGY1RUlzYjN2bTR5YmY3S3BrWW9HUGhYVDVMQWh1VmpEbFdqTW5KZHVCaiUyRGZoWU5wdndnSlM3MnROemViM1VscjhmMk8wS09UY0o4TTZtbnRISiUyRGRlQ1gxSXkwdktRY3hSUEt0TVZmYU16Qms3eCUyRFJJczhMUklydnltSCU1Rk1QZmJQMmR6VTJwSjR0S2lhWThMNGh1Wnd6dFBPMVklMkU%3D how can I create same type of url? Link to comment https://forums.phpfreaks.com/topic/181801-url-redirect-need-help/ Share on other sites More sharing options...
[n3rve] Posted November 17, 2009 Share Posted November 17, 2009 A normal 301 redirect? <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.n3rve.us/exit.php" ); die(); ?> The above piece of code will permanently redirect (301 redirect) the PHP page to http://www.n3rve.us/exit.php, where “exit.php” is a php page on the domain “http://www.domain.com”. Also adding die() towards the end of the script ensures that no other piece of code is executed on the PHP page that you are redirecting. -[n3rve] Link to comment https://forums.phpfreaks.com/topic/181801-url-redirect-need-help/#findComment-958799 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.