WordPress.org

Ready to get started?Download WordPress

Forums

Possible URL length problem (3 posts)

  1. daddyg
    Member
    Posted 6 years ago #

    Hi,

    Is there a maximum length URL that wordpress can handle?

    I've put a aweber optin email form beneath all my posts and I'm using the following php in a file in my theme files directory to spit out a message to the subscriber:-

    if(isset($_GET['from']))
    {
    $email=$_GET['from'];

    echo '
    <p>An email has been sent to email address ',$email,'. Please click the link inside it now to confirm your subscription!</p>';

    }

    So the subscriber enters their email address, then all the form variables are appended to the post URL.

    If the form just contains one input box for the email address, then the form gets processed correctly and the above "check your email" message gets displayed.

    Here's the URL that gets displayed in the browser after the webform variables are passed through:-

    http://graham-cox.com/how-to-create-your-own-squeeze-page-in-minutes/?from=awebertest2%40grahamcoxnewsletter%2ecom&meta_adtracking=13&meta_message=1&meta_required=from&meta_split_id=&meta_web_form_id=1712318294&submit=Go%21&unit=graham%2dcox%2dblog

    The problem is when I add a second input box for the user to add their first name (which I can then add to the above code to personalise the message). Then I get this message:-

    "Failing URL I'm sorry, but the post or page you're looking for could not be found."

    Now that message was written by the theme creator so perhaps I should be asking him. However the url created when this fails is about 20 characters longer than the working one:-

    http://graham-cox.com/how-to-create-your-own-squeeze-page-in-minutes/?from=awebertest1%40grahamcoxnewsletter%2ecom&meta_adtracking=13&meta_message=1&meta_required=from%2cname&meta_split_id=&meta_web_form_id=1712318294&name=Graham%20&submit=Go%21&unit=graham%2dcox%2dblog

    So I just wondered if it was a url length problem?

    If anyone has any idea what's causing this I'd be very grateful.

    Thanks

    Graham

  2. huckmag
    Member
    Posted 6 years ago #

    You could use something like this plugin:

    http://pietersz.co.uk/2006/07/wordpress-slug-trimmer

    It has options to set the maximum character length for URLs so you could set it to below 20, to stop the rror your getting with the emails.

  3. daddyg
    Member
    Posted 6 years ago #

    Thanks huckmag.

    But can't you just use the post slug feature in the wp control panel to abbreviate the post-title to something shorter?

    I was really trying to find out if there was a known limit that would explain why one works and the other doesn't.

    Anyone know about a max url length

    Thanks

    Graham

Topic Closed

This topic has been closed to new replies.

About this Topic