Redirect Problem – htaccess?
-
Hi, hope this post is in the right place…
We use two registration links allowing users to register for different roles:
/wp-login.php?action=register&utype=subscriber
/wp-login.php?action=register&utype=contributerThe subscriber link is the simple registration page and the contributer link contains extra fields. When a registration page fails (e-mail already in use) it is redirected to just the standard /wp-login.php?action=register page. How can I direct to the page that the request came from i.e. subscriber if that’s the page that the request from, or contributer if it came from that link?
I’ve tried:
function my_reg_fail($username){ // Get the reffering page, where did the post submission come from? $referrer = $_SERVER['HTTP_REFERER']; // if there's a valid referrer if(!empty($referrer)){ // redirect wp_redirect($referrer); exit; } }
This seems to cause a problem, in IE it does nothing and in Firefox it says:
“The page isn’t redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies.”The $referrer returns the correct address if I echo it, I think it’s something to do with htaccess?
The htaccess file contains:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /proofing/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /proofing/index.php [L] </IfModule> # END WordPress
Where ‘proofing’ is the directory of the WordPress site. Any thoughts on this?
Many thanks!
- The topic ‘Redirect Problem – htaccess?’ is closed to new replies.