Title: Making wp-comments-post.php automatically redirect users?
Last modified: August 20, 2016

---

# Making wp-comments-post.php automatically redirect users?

 *  [salomon.meij](https://wordpress.org/support/users/salomonmeij/)
 * (@salomonmeij)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/making-wp-comments-postphp-automatically-redirect-users/)
 * wp-comments-post.php: [http://pastebin.com/EB7SS3wv](http://pastebin.com/EB7SS3wv)
 * When posting comments, users sometimes get directed to the wp-comments-post.php
   address, which generates messages letting them know if the comment is a duplicate,
   you forgot to fill in a field, you provided an invalid e-mailadress, etc. Now
   I’d like this wp-comments-post.php to also automatically redirect users back 
   to the page they came from. How can I do this?
 * I included a vanilla wp-comments-post.php pastebin, for reference.

The topic ‘Making wp-comments-post.php automatically redirect users?’ is closed 
to new replies.

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)
 * [redirecting](https://wordpress.org/support/topic-tag/redirecting/)
 * [wp-comments-post.php](https://wordpress.org/support/topic-tag/wp-comments-post-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [salomon.meij](https://wordpress.org/support/users/salomonmeij/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/making-wp-comments-postphp-automatically-redirect-users/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
