1

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

zuber28
  • 7
  • 1
  • 5

3 Answers3

2

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>
PravinS
  • 2,640
  • 3
  • 21
  • 25
1

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.

Engineer
  • 5,911
  • 4
  • 31
  • 58
1

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>
Ed Capetti
  • 339
  • 2
  • 10