skip to Main Content

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

3

Answers


  1. 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>
    
    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
  3. 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>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search