Title: Problems with automatic redirects
Last modified: October 8, 2020

---

# Problems with automatic redirects

 *  [juanchoarboleda1](https://wordpress.org/support/users/juanchoarboleda1/)
 * (@juanchoarboleda1)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/problems-with-automatic-redirects/)
 * Hello. I am using a realter’s company plug in called Wasi (the plugin is in github,
   not in wordpress). I am having trouble with the plugin because wordpress does
   automatic redirects. I further explain my problem below.
 * When I set up the plug in I am asked to create a blank page, which will be used
   by the plugin to display single for sale properties. Therefore, the the end user(
   web page visitor) can click on a link of any property on the property list and
   go to the single property page, where that property’s information is displayed.
 * I have set up “prop” page to be the one to display single properties. Therefore
   when the user clicks on a property, he is taken to [http://www.restrepoecheverri.com/prop/%propertyId%](http://www.restrepoecheverri.com/prop/%propertyId%)(
   lest say the property Id is 25531, so he would be taken to [http://www.restrepoecheverri.com/prop/25531](http://www.restrepoecheverri.com/prop/25531)).
   Anyhow, when the GET request is send to [http://www.restrepoecheverri.com/prop/25531](http://www.restrepoecheverri.com/prop/25531),
   the server responds with a 301 redirect to [http://www.restrepoecheverri.com/prop/](http://www.restrepoecheverri.com/prop/).
   I think that this is caused by a WordPress automatic redirect. Therefore, I am
   trying to disable that WordPress automatic redirect, so I am able to use my plug
   in.
 * I hope I have been clear enough and someone can help me with this.
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblems-with-automatic-redirects%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 8 months ago](https://wordpress.org/support/topic/problems-with-automatic-redirects/#post-13510570)
 * If this is the plugin `https://github.com/wasico/wasi-connector` I suggest asking
   at [https://github.com/wasico/wasi-connector/issues](https://github.com/wasico/wasi-connector/issues)
 *  Thread Starter [juanchoarboleda1](https://wordpress.org/support/users/juanchoarboleda1/)
 * (@juanchoarboleda1)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/problems-with-automatic-redirects/#post-13510649)
 * [@sterndata](https://wordpress.org/support/users/sterndata/) Right. No one seems
   to answer there. I know it seems like a plug in problem, but all I want to do
   is disable automatic redirects in WordPress. Do you know how to do that?
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/problems-with-automatic-redirects/#post-13514514)
 * I think redirects are caused by redirect_canonical(). It has a filter where you
   can alter its behavior. I don’t think that’s the right approach though. I think
   you should add a custom rewrite rule so WP properly handles the ID element in
   the URL
    [https://developer.wordpress.org/reference/functions/add_rewrite_rule/](https://developer.wordpress.org/reference/functions/add_rewrite_rule/)
 * You also need to whitelist whatever query var you assign the property ID to through
   the “query_vars” filter. Finally, alter how the request handler code gets the
   ID. I assume this is some sort of template code for the “prop” page and it parses
   the request in some manner. After being properly rewritten, the value will be
   a query var in the global `$wp_query` object. You can use its `get()` method 
   to get the query var value.
 * N.B. – while there are superficial similarities, redirect and rewrite are two
   very different concepts. Mainly, one causes a new request be made, the other 
   does not.

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

The topic ‘Problems with automatic redirects’ is closed to new replies.

## Tags

 * [automatic redirect](https://wordpress.org/support/topic-tag/automatic-redirect/)
 * [plugin error](https://wordpress.org/support/topic-tag/plugin-error/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 3 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/problems-with-automatic-redirects/#post-13514514)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
