Title: goto url
Last modified: August 21, 2016

---

# goto url

 *  Resolved [cavey85](https://wordpress.org/support/users/cavey85/)
 * (@cavey85)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/goto-url/)
 * Between the div tags is the error message, what is showed a new page.
    I would
   like to set an url instead of div’s content. How to solve this problem? Thx
 * The code is…
 *     ```
       <?php
   
       global $wpdb;
   
       if ($_GET['subscribed'] == "true")
       {
               require "templates/confirm_subscription.html";
               exit;
       }
   
       function error($error)
       {
   
               ?>
   
       <div style="font-family: Arial">
         <h2 align="center">An Error Has Occured</h2>
         <div align="center">
           <div style="width: 400px; padding: 10px; text-align: left; background-color: #336699; color: #fff; font-weight:bold; font-family: Arial; border: 1px solid #ccc;"> <?php echo $error ?> </div>
           <a href="javascript:window.history.go(-1);">Click Here To Go Back</a> </div>
       </div>
       <?php
               wp_credits();
               exit;
   
       }
       ```
   

Viewing 1 replies (of 1 total)

 *  [mrspabs](https://wordpress.org/support/users/mrspabs/)
 * (@mrspabs)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/goto-url/#post-4133255)
 * Its hard to understand what you want.. are you saying that instead of displaying
   the error , you want to redirect to another url?

Viewing 1 replies (of 1 total)

The topic ‘goto url’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [mrspabs](https://wordpress.org/support/users/mrspabs/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/goto-url/#post-4133255)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
