Thread: PHP Redirection Question
Results 1 to 2 of 2
Related
-
What Redirection Code Forum: HTML Forum
Replies: 1 -
Redirection after form submission Forum: CGI Perl Forum
Replies: 3 -
Domain Name Redirection Code Forum: HTML Forum
Replies: 2 -
Need help with Permanent Domain Redirection Forum: Search Engine Optimization - SEO - Forum
Replies: 2
-
02-13-2010, 11:25 AM #1
PHP Redirection Question
I am at a bind of how to make
my PHP Redirection to an affiliate
product page work.
This is what I know and have done:
Created a folder called "recommend"
Opened and saved a notepad file in the
"recommend" folder which I named "index.php"
The only content in the "index.php" is
<?php
header("location:http: // www. xxx . com");
exit;
?>
The XXX.com is replaced with my affiliate
link.
I uploaded the "recommend" folder
with the index.php inside. When I access it
from the browser through XXX.com/recommend,
it does not take me to the affiliate page. In short
it does not work.
Please what am I missing out? Is the above code
complete, or there more coding to make it work
-
08-01-2010, 01:01 PM #2
Re: PHP Redirection Question
Do you get an error message?
You might have some spaces in the wrong places - here's how I'd write it:
[php]<?php
header('Location: http://www.somesite.com/');
exit;
?>
Save that as a plain text file - if you're using Notepad that comes with Windows I highly suggest you stop and get a decent editor like Notepad++
Notepad with Windows can and does place strange random characters on the end of files. Invisible to use but at some times can cause scripts to malfunction.
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum