Title: WordPress and htaccess
Last modified: August 19, 2016

---

# WordPress and htaccess

 *  [esone](https://wordpress.org/support/users/esone/)
 * (@esone)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/wordpress-and-htaccess/)
 * I am currently working on a htaccess file for my site [http://www.pandaandpenguin.com](http://www.pandaandpenguin.com)
 * I currently have the htaccess redirecting 1 IP to a custom 403.
 * I have the following in my htaccess, so far.
 *     ```
       Options +FollowSymlinks
       RewriteEngine on
       RewriteCond %{REMOTE_HOST} xx\.xxx\.xx
       RewriteRule \.php$ http://www.pandaandpenguin.com/errors/403error.html/[R=301,L]
       ```
   
 * I am also wanting to redirect one of my pages to a new page. The forums page 
   in my userbar I will need to link to [http://www.pandaandpenguin.com/forum](http://www.pandaandpenguin.com/forum)
 * I am not sure what the code for this is, or how to implement the code with what
   I have to make them still both work. I just learned about htaccess today, and
   have very little/no coding knowledge. Thanks in advance for your help!
 * P.S. My IP redirect works fine alone.
 * I just tried the following code with no prevail:
 *     ```
       RewriteCond %{QUERY_STRING} ^page_id=180$
       RewriteRule ^/page.php$ http://www.pandaandpenguin.com/forum? [L,R=301]
       ```
   
 * I added to the code that was already there, tried replacing the IP redirect with
   it just to see if it works, and neither way worked.

Viewing 1 replies (of 1 total)

 *  Thread Starter [esone](https://wordpress.org/support/users/esone/)
 * (@esone)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/wordpress-and-htaccess/#post-1287277)
 * I fixed it!
 *     ```
       RewriteEngine On
       Options +FollowSymlinks
       RewriteCond %{REMOTE_HOST} 67\.159\.44
       RewriteRule \.php$ http://www.pandaandpenguin.com/errors/403error.html/[R=301,L] 
   
       RewriteCond %{QUERY_STRING} page_id=180
       RewriteRule ^index\.php$ http://www.pandaandpenguin.com/forum/$1? [R=301,L]
       ```
   
 * Was the correct way ^_^

Viewing 1 replies (of 1 total)

The topic ‘WordPress and htaccess’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [esone](https://wordpress.org/support/users/esone/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/wordpress-and-htaccess/#post-1287277)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
