Title: Another redirect issue&#8230;
Last modified: September 1, 2016

---

# Another redirect issue…

 *  [JS](https://wordpress.org/support/users/jsylvia90/)
 * (@jsylvia90)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/another-redirect-issue/)
 * I have a creativeplayschoolnb.com and is also has an alias thenephewsrestaruanct.
   com that we have been using for a second site in a subdirectory here thenephewsrestaurant.
   com/thenephewsrestaurant/. We used a javascript redirect for over 10 years when
   both sites were HTML.
 * The creativeplayschoolnb.com new wp site is fine, and we are trying to use an.
   htaccess to redirect thenewphewsrestaurant.com.
 * We’ve tried several different suggested .htaccess rewrite codes the closest being:
 *     ```
       rewritecond %{http_host} ^thenephewsrestaurant.com [nc]
       rewriterule ^(.*)$ http://www.thenephewsrestaurant.com/thenephewsrestaurant/$1 [r=301,nc]
       ```
   
 * The problem is that it only works for thenephewsrestaurant.com but does not for
   [http://www.thenephewsrestaurant.com](http://www.thenephewsrestaurant.com).
 * I am waiting on my host support for suggestions, but thought I would try here
   in the mean time. Any suggestions would be appreciated. Thanks!

Viewing 1 replies (of 1 total)

 *  Thread Starter [JS](https://wordpress.org/support/users/jsylvia90/)
 * (@jsylvia90)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/another-redirect-issue/#post-7707889)
 * OK! I searched and searched and finally found the correct code that works across
   the board on our server. I tired several variations from different sources, but
   this is the one that worked… Just in case anyone is interested :
 *     ```
       RewriteEngine On
       RewriteCond %{HTTP_HOST} ^(www.)?thenephewsrestaurant.com$
       RewriteRule ^(/)?$ thenephewsrestaurant [L]
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Another redirect issue…’ is closed to new replies.

## Tags

 * [alias](https://wordpress.org/support/topic-tag/alias/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)
 * [Sub-directory](https://wordpress.org/support/topic-tag/sub-directory/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [JS](https://wordpress.org/support/users/jsylvia90/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/another-redirect-issue/#post-7707889)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
