.htaccess method to allow WordPress to accept querystring from AWeber (3 posts)

  1. Cenay
    Posted 3 years ago #

    I have a series of Aweber forms I am using to capture info from readers. I want to send them to a "thank you page" with some customizations (and this is the important part) and prefill the new form that will be there with their name and email address.

    WordPress just chokes on the querystring that contains "name="

    So, I went in search of a method to rewrite the query string from name= to fullname=

    There were many suggestions out there, some that got close, but none that I could actually implement in a way that worked.

    This one was especially helpful:

    I follow it (just barely) and attempted to implement, only to be met with failure after failure. I tried many different things (too many to list here) but am convinced I am close.

    In fact, when I test with the querystring already modified to include fullname= (instead of name=) my code on page works just fine. So I am down to resolving the issue at hand with the .htaccess file.

    I am including it below, and would be very appreciative if someone more knowledgeable than me could review and if anything jumps out at you, to let me know. Or, if you have a favorite resource for deconstructing .htaccess methods, I am happy to continue to "do the work".

    I would have replied on the forum thread listed above, but they closed it to new replies.

    -----------------------[ .htaccess file contents
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On

    # Used to allow form variables from AWeber in WordPress
    RewriteCond %{QUERY_STRING} (.+?)&name=(.+?)
    RewriteRule ^thank-you-sa/ /thank-you-sa/?%1&fullname=%2 [R,NC,L]

    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . /index.php [L]

    # END WordPress
    -------------------------------------[ end .htaccess file contents

    Page where first AWeber form appears: (probably don't need this, but trying to be thorough)

    Link I received from AWeber during the redirect:
    (This fails)

    Link tested with name= changed to fullname=
    (This works, proof I need to change the querystring)

    After hours of looking and testing, I really would hate to tell my client I just can't get this done. I am open to any suggestions or resources anyone can provide.

    Thanks in advance for your help and insight.

    Skype: CenayNailor

  2. Cenay
    Posted 3 years ago #

    Come on all you code heads, surely this isn't defeating you too?

  3. Cenay
    Posted 3 years ago #

    I don't understand, this type of post normally gets at least one response. I guess I will have to tell my client I can't help. I've spent days on this with no results. To any to find this post later, sorry your search was in vain.

Topic Closed

This topic has been closed to new replies.

About this Topic