Reputation: 13
Hi, I want to redirect my page to another website, I used anchor tag but when I click on this it will add my website name also http://au.pricecomparereview.com/www.theiconic.com.au/Rococo-Textured-Mini-Skirt-113532.html
Please tell me about this . I am new in php I am using oscommerce
www.theiconic.com.au/Rococo-Textured-Mini-Skirt-113532.html
Upvotes: 1
Views: 97
Reputation: 339
If you want a PHP approach try this:
// Declare url variable
$url = "http://www.theiconic.com.au/Rococo-Textured-Mini-Skirt-113532.html";
// Use it to create the <a> with php
echo "<a href="$url" target="_blank">www.theiconic.com.au</a>";
Or with html use the PHP assing tags:
<a href="<?=$url ?>" target="_blank">www.theiconic.com.au</a>
Upvotes: 1
Reputation: 6000
I think your anchor tag would be like this presently:
<a href="www.theiconic.com.au/Rococo-Textured-Mini-Skirt-113532.html" target="_blank">www.theiconic.com.au</a>
Change it to
<a href="//www.theiconic.com.au/Rococo-Textured-Mini-Skirt-113532.html" target="_blank">www.theiconic.com.au</a>
and it will work fine.
Upvotes: 1
Reputation: 2584
use like this, you may be missing http://
<a href="http://www.theiconic.com.au/Rococo-Textured-Mini-Skirt-113532.html" target="_blank">www.theiconic.com.au</a>
Upvotes: 2