Question

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

Was it helpful?

Solution 2

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>

OTHER TIPS

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>

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top