Title: Basic task?
Last modified: August 24, 2016

---

# Basic task?

 *  Resolved [Jimbly2](https://wordpress.org/support/users/jimbly2/)
 * (@jimbly2)
 * [11 years ago](https://wordpress.org/support/topic/basic-task-1/)
 * Hello – I’m not sure that what I’m wanting to do is actually possible, though
   it seems like it should be.
 * I have a wp site installed at [http://wp.mysite.com/wp](http://wp.mysite.com/wp)
 * I want to redirect people going to the old site [http://www.mysite.com](http://www.mysite.com)
   
   to the new one – BUT keep [http://www.mysite.com](http://www.mysite.com) in the
   url bar.
 * Redirecting with .htaccess was easy – but because mod_proxy cannot be enabled
   on the server, I can’t do it with .htaccess.
 * Can I do it with this plugin?
 * Thanks for all/any help! Jim
 * [https://wordpress.org/plugins/cleverwise-redirect-it/](https://wordpress.org/plugins/cleverwise-redirect-it/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Me](https://wordpress.org/support/users/cyberws/)
 * (@cyberws)
 * [11 years ago](https://wordpress.org/support/topic/basic-task-1/#post-6091415)
 * This plugin won’t accomplish that task. However WordPress supports that out of
   the box, although it is best if the files are installed in a directory on the
   same server.
 * Anyway what you do is go to “Settings” then “General”. You’ll see “WordPress 
   Address (URL)” and “Site Address (URL)”.
 * WordPress Address (URL) would be your [http://wp.mysite.com/wp](http://wp.mysite.com/wp)
   
   Site Address (URL) would be [http://www.mysite.com](http://www.mysite.com)
 * Sorry one last step is you need update your .htaccess file to load the index.
   php in wp.mysite.com/wp or copy the index.php to your main site directory and
   then edit that file to load from the /wp directory. That is why the files should
   be on the same server.
 * Then save changes. That’s it.
 *  Thread Starter [Jimbly2](https://wordpress.org/support/users/jimbly2/)
 * (@jimbly2)
 * [11 years ago](https://wordpress.org/support/topic/basic-task-1/#post-6091416)
 * Hi Jeremy,
 * Thanks for that – if I do that, I just get this returned:
 * Warning: require(/home/www/mysite.com/wp-blog-header.php) [function.require]:
   failed to open stream: No such file or directory in /home/www/mysite.com/index.
   php on line 17
 * Fatal error: require() [function.require]: Failed opening required ‘/home/www/
   mysite.com/wp-blog-header.php’ (include_path=’.:/usr/local/php5.3/lib//php’) 
   in /home/www/mysite.com/index.php on line 17
 * Is this an easy fix?
 * Thanks for your help,
    Jim
 *  Plugin Author [Me](https://wordpress.org/support/users/cyberws/)
 * (@cyberws)
 * [11 years ago](https://wordpress.org/support/topic/basic-task-1/#post-6091417)
 * The way to really do this is install wp into a subdirectory say:
 * [http://www.mysite.com/wp/](http://www.mysite.com/wp/) where /wp/ is obviously
   a directory.
 * or
 * [http://www.mysite.com/content/](http://www.mysite.com/content/) where /content/
   is obviously a directory.
 * Then copy the index.php from the WordPress directory say /wp/ to just the website
   root.
 * Next open up index.php (download if need be) and look for:
 * `require('./wp-blog-header.php');`
 * Add your subdirectory to the line (if wp was your directory then):
 * `require('./wp/wp-blog-header.php');`
 * Save this file (and upload if edited it off server).
 * WordPress will now load when someone visits your [http://www.mysite.com](http://www.mysite.com)
   even though WP isn’t installed there.
 * The final step is editing the .htaccess so any non existing file will be automatically
   redirected to WP.
 *     ```
       RewriteEngine On
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /index.php [L]
       ```
   
 *  Thread Starter [Jimbly2](https://wordpress.org/support/users/jimbly2/)
 * (@jimbly2)
 * [11 years ago](https://wordpress.org/support/topic/basic-task-1/#post-6091421)
 * Hi – ok, sorry, nearly there I think! I’ve copied the index.php file to the root
   and updated the absolute path to the wp install – but still have this error now:
 * Warning: require(/home/www/cache-media.comhttp://wp.cache-media.com/wp/wp-blog-
   header.php) [function.require]: failed to open stream: No such file or directory
   in /home/www/cache-media.com/index.php on line 17
 * Fatal error: require() [function.require]: Failed opening required ‘/home/www/
   mysite.comhttp://wp.mysite.com/wp/wp-blog-header.php’ (include_path=’.:/usr/local/
   php5.3/lib//php’) in /home/www/mysite.com/index.php on line 17
 * Looks like the paths are all messed up but I only entered the full path to the
   wp install?
 *  Thread Starter [Jimbly2](https://wordpress.org/support/users/jimbly2/)
 * (@jimbly2)
 * [11 years ago](https://wordpress.org/support/topic/basic-task-1/#post-6091422)
 * Maybe this doesn’t work with a sub domain, only a sub dir?
 *  Plugin Author [Me](https://wordpress.org/support/users/cyberws/)
 * (@cyberws)
 * [11 years ago](https://wordpress.org/support/topic/basic-task-1/#post-6091423)
 * You can’t use a URL. It must be a directory readable by the main site. You can
   use a subdomain if that directory is readable from the host site.
 * For example in many hosting panels when creating a subdomain a directory is created
   under the home directory.
 * wp.mysite.tld points to: /home/mysite.tld/public_html/wp/
 * `require('./wp/wp-blog-header.php');`
 * Or if you aren’t using a hosting panel as long as that directory is readable 
   by WP it would work too.
 * [http://www.mysite.tld](http://www.mysite.tld) is at /home/mysite.tld/public_html
 * wp.mysite.tld is at home/wpmysite.tld/public_html
 * So again if mysite.tld could read /home/wpmysite.tld/public_html you would be
   okay. In that case:
 * `require('/home/wpmysite.tld/public_html/wp-blog-header.php');`
 * It just depends on your internal server setup. However for the sake of making
   it easier it just better to install /wp/ in a subdirectory on the main site. 
   That will accomplish everything you want in keeping the main URL at the top just
   mysite.tld. Of course it is your call.
 *  Thread Starter [Jimbly2](https://wordpress.org/support/users/jimbly2/)
 * (@jimbly2)
 * [11 years ago](https://wordpress.org/support/topic/basic-task-1/#post-6091424)
 * All sorted – changed the path and hey presto! Thanks so much for your help,
 * Best,
    Jim
 *  Plugin Author [Me](https://wordpress.org/support/users/cyberws/)
 * (@cyberws)
 * [11 years ago](https://wordpress.org/support/topic/basic-task-1/#post-6091440)
 * Good deal.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Basic task?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cleverwise-redirect-it.svg)
 * [Cleverwise Redirect It](https://wordpress.org/plugins/cleverwise-redirect-it/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cleverwise-redirect-it/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cleverwise-redirect-it/)
 * [Active Topics](https://wordpress.org/support/plugin/cleverwise-redirect-it/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cleverwise-redirect-it/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cleverwise-redirect-it/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Me](https://wordpress.org/support/users/cyberws/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/basic-task-1/#post-6091440)
 * Status: resolved