Need a new web host or having a problem with a script? Tips and advice on the best way to design, build and maintain your most valuable asset - your website!
Hi, I'm following the tutorial for making redirects for wordpress. here's my code: <?php header( ‘Location: http://www.hypnosisdownloads.com/?0000’ ) ; ?>
I've done everything exactly as per instructions but I'm getting the error message as follows: " Parse error: syntax error, unexpected ':' in /public_html/blog-ehyp/recommends/hypnosisdownloads/index.php on line 2 "
Well, I can't see an extra ":" anywhere ! Any ideas please? Thanks
1
faradina Posts: 1895 Joined: 01 Jun 09 Trust:
22 Jul 09 11:02 am
Did you use Word at any phase in the process of creating your redirect file? Word is the most common culprit for parse errors. Use notepad to make your index.php redirect file.
1
alexis Posts: 10 Joined: 28 Apr 09 Trust:
22 Jul 09 11:20 am
Hi Faradina,
No, just notepad, clean and simple. I don't know what else to try, at the moment I'm stuck with ugly links on my wordpress sites. Any ideas gratefully received ! ;-) Thanks
1
faradina Posts: 1895 Joined: 01 Jun 09 Trust:
22 Jul 09 11:59 am
Are you on Hostgator? Another member had this same problem. He's on hostgator and hostgator support went into it and cleaned out the error. Check this forum topic:
26 Jul 09 7:24 pm
I checked with my host, Bluehost and the problem is that the link I was using uses the single exclamation mark as here: ' When I use the double one, as here: " the link works perfectly. Hope this helps somebody. ;-)
The code Mark posted used the double quotes but also has an exit line. The exit stops any further code being executed on the page and can sometimes be an effective security measure against any malicious code being run on the page.
18 Jan 10 2:27 am
I seemed to have the same error when I used Notedpad. But using TextEditor on a Mac seems to work fine with the redirect for Clickbank products. However, when I use an affiliate code for another outfit, even though I use the exact same php code with the new affiliate code I get the same error mentioned above. Maybe I'm wrong but I think some affiliate programs are blocking the redirect - am I wrong? (and I'm using the exit code that Mark used). The affiliate program I'm taking about is ShareASale.
1
Angela B
evobilly Posts: 662 Joined: 27 Oct 08 Trust:
18 Jan 10 9:30 pm
ive seen this issue around and i think it is coursed in some cases by the comma ' there are some that have a little curl on them well other look like a little straght dash and it seems it donsn't like the curl as it must see it different.
If your having trouble re-writing your articles i recommend checking out this tool to make it quick and easy http://goto2.com/rewriter
If you want to outsource your articles this place seems to be good value and easy to deal with, and its free to sign up they offer a 100% American writing team http://bit.ly/bhv4Fu
nick Posts: 216 Joined: 17 May 06 Trust:
19 Jan 10 2:36 am
Indeed. It also pays to put an exit after it as well
<?php header('Location: ......'); exit; ?>
1
This topic was started on Jul 20, 2009 and has been closed due to inactivity. If you want to discuss this topic further, please create a new forum topic.