Title: Manual Redirect
Last modified: August 20, 2016

---

# Manual Redirect

 *  [markweb](https://wordpress.org/support/users/markweb/)
 * (@markweb)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/)
 * Hi,
 * I am trying create a manual redirect so that I can let my visitor choose where
   they are going next as apposed to automatically sending them through browser 
   detection, I can create a splash page easily but how do I include the string 
   in the browser so that the visitor goes to the same page on a different url, 
   the only code I can find is 301 redirect which I can only make it permanently
   redirect apposed to the visitor choosing.
 * Many thanks in advance for any thoughts or solutions
 * Mark

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/manual-redirect/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/manual-redirect/page/2/?output_format=md)

 *  [luckdragon](https://wordpress.org/support/users/luckdragon/)
 * (@luckdragon)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776640)
 * are you saying that on the first visit, they choose, but from that point forward,
   they don’t? and what do you mean by go to the same page on a different url, as
   far as a browser is concerned, if it’s a different url, it’s a different page,
   even if the content is the same.
 *  Thread Starter [markweb](https://wordpress.org/support/users/markweb/)
 * (@markweb)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776642)
 * Luckdragon,
 * thanks so much for getting back to me, I will try to explain in a bit more detail.
 * If a visitor visits site from google the address in the browser could be something
   like this:
 * mainsite.com/norovirus/cruise-ship-norovirus/
 * but I want them to have a choice to go to the mobile site so that they would 
   still see the same page on mobile site as the link structure is the same so they
   would then go to:
 * mobilesite.com/norovirus/cruise-ship-norovirus/
 * basicaly the visitor would see two links
 * 1)mobile 2)desktop
 * setting up two links on the splash page I can manage, the problem is adding the
   original string to the second site link so that visitor doesn’t have to do another
   search to get where they wanted too is the bit that I am struggling with.
 * it would seem to be basically a 301 follow all links which works manually instead
   of automatically thus giving the visitor a choice.
 * Regards
 * Mark
 *  [luckdragon](https://wordpress.org/support/users/luckdragon/)
 * (@luckdragon)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776644)
 * why can’t you just hardcode the link? i.e.
 *     ```
       <a href='mobilesite.com/whatever/whatever'>Mobile Site</a> |
       <a href='mainsite.com/whatever/whatever'>Main Site</a>
       ```
   
 * also, I would recommend the use of subdomains..
    i.e. mainsite.com just has the“
   choice” page which directs them to either mobile.mainsite.com or desktop.mainsite.
   com
 * you could easily create an index.php file for “mainsite.com” that does:
 *     ```
       Please Choose Your Destination:
       <a href='mobile.mainsite.com<?=$_SERVER['REQUEST_URI']?>'>Mobile Site</a> |
       <a href='desktop.mainsite.com<?=$_SERVER['REQUEST_URI']?>'>Desktop Site</a>
       ```
   
 * <?
 *  Thread Starter [markweb](https://wordpress.org/support/users/markweb/)
 * (@markweb)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776647)
 * Hi, thats exactly what I want to achieve, I have tried adding the code to my 
   splash page but it is html section of wp spash and come back with errors when
   I add the following:
 *     ```
       Please Choose Your Destination:
       <a href='http://mobile.mysite.co.uk<?=$_SERVER['REQUEST_URI']?>'>Mobile Site</a> |
       <a href='mysite.co.uk<?=$_SERVER['REQUEST_URI']?>'>Desktop Site</a>
       ```
   
 * is there anyway I can make this work on the html spash page ?
 * Regards
 * Mark
 *  [luckdragon](https://wordpress.org/support/users/luckdragon/)
 * (@luckdragon)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776651)
 * why does it have to be html? you can’t create a .php file?
 *  Thread Starter [markweb](https://wordpress.org/support/users/markweb/)
 * (@markweb)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776655)
 * Hia,
 * thanks for being so patient, the main reason is that I am using a the wp splash
   page plugin which allows images and video but also html code as options to be
   added the splash page,
 * It also allows you to setup many other options like time delays ect… though it
   seemed like a good starting place.
 * Regards
 * Mark
 * Plugin Page
 *  [luckdragon](https://wordpress.org/support/users/luckdragon/)
 * (@luckdragon)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776656)
 * yes, but it is still wp, which means that it’s a script, you could add a filter
   to functions.php that parses out variables
 * so you could do like:
 *     ```
       <a href='mainsite.com/%%uri%%'>Main Site</a> |
       <a href='mobilesite.com/%%uri%%'>Mobile Site</a>
       ```
   
 * then in functions.php for your theme:
 *     ```
       add_filter( 'the_content', 'my_the_content_filter' );
       function my_the_content_filter($content) {
   
         $content = str_replace("%%uri%%",$_SERVER['REQUEST_URI'],$content);
         return $content;
       }
       ```
   
 *  Thread Starter [markweb](https://wordpress.org/support/users/markweb/)
 * (@markweb)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776659)
 * Hi, I have added the code and I am returning the following in the browser for
   main site:
 * [http://mobilesite.com/mainsite.com/%%uri%%](http://mobilesite.com/mainsite.com/%%uri%%)
 * and the following for mobile site:
 * [http://mobilesite.com/mobilesite.com/%%uri%%](http://mobilesite.com/mobilesite.com/%%uri%%)
 * and the error message
 * 400 bad request
 * Bad Request
 * Your browser sent a request that this server could not understand.
 *  [luckdragon](https://wordpress.org/support/users/luckdragon/)
 * (@luckdragon)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776661)
 * is the page you’re displaying part of the plugin, or is it actually a page ?
 *  Thread Starter [markweb](https://wordpress.org/support/users/markweb/)
 * (@markweb)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776662)
 * Hi its proberly easier to just show you the mobile site
 * Regards
 * Mark
 *  [luckdragon](https://wordpress.org/support/users/luckdragon/)
 * (@luckdragon)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776663)
 * no, the filter that I gave you works on post/page content… if the plugin you 
   are using for the splash page doesn’t have post/page content, then we need to
   do it a different way.
 *  [luckdragon](https://wordpress.org/support/users/luckdragon/)
 * (@luckdragon)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776667)
 * are you using the html option or the iframe option?
 *  Thread Starter [markweb](https://wordpress.org/support/users/markweb/)
 * (@markweb)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776669)
 * No the plugin doesn’t have post page content, the only other option is to include
   a page, which it does do in a frame and so not sure that that’s any help.
 * Mark
 *  Thread Starter [markweb](https://wordpress.org/support/users/markweb/)
 * (@markweb)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776670)
 * I have been using the HTML option
 *  [luckdragon](https://wordpress.org/support/users/luckdragon/)
 * (@luckdragon)
 * [14 years ago](https://wordpress.org/support/topic/manual-redirect/#post-2776671)
 * ok, then in the plugin, in the file:
    wsi/wsi/front/splasy/content.inc.php
 * you will find:
 *     ```
       <?php echo stripslashes($siBean->getWsi_html()); ?>
       ```
   
 * change it to:
 *     ```
       <?php echo stripslashes(str_replace("%%uri%%",$_SERVER['REQUEST_URI'],$siBean->getWsi_html())); ?>
       ```
   

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/manual-redirect/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/manual-redirect/page/2/?output_format=md)

The topic ‘Manual Redirect’ is closed to new replies.

## Tags

 * [Manual Redirect](https://wordpress.org/support/topic-tag/manual-redirect/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 22 replies
 * 2 participants
 * Last reply from: [markweb](https://wordpress.org/support/users/markweb/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/manual-redirect/page/2/#post-2776708)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
