ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Mailing list confirmation links broken

June 08, 2009 7:12am

Subscribe [3]
  • #1 / Jun 08, 2009 7:12am

    ellimondo

    15 posts

    Hi

    I am very much a virgin new boy so be gentle please.

    I have installed freeform module and have the form assigning subscribers to the mailing list module. All works fine and dandy. However I am using LG .htaccess Generator to remove index.php and have also removed index.php from the site’s general settings.

    The problem is that EE generates a link from the confirmation emails of

    http://sitename.com/?ACT=4&id=YZeUfT0QSO

    Instead of

    http://sitename.com/index.php?ACT=4&id=YZeUfT0QSO

    This breaks the link and fails to add the user to the mailing list.

    The question is how do I return the index.php into the {activate_url} variable and, I am pre-empting here, any other pages and variables that rely on having index.php to function correctly?

    Many thanks in advance

    Jon

  • #2 / Jun 08, 2009 10:06am

    Sue Crocker

    26054 posts

    Do you have an .htaccess file in place? What is in it?

  • #3 / Jun 09, 2009 5:36am

    ellimondo

    15 posts

    # -- LG .htaccess Generator Start --
    
    # .htaccess generated by LG .htaccess Generator v1.0.0
    # <a href="http://leevigraham.com/cms-customisation/expressionengine/addon/lg-htaccess-generator/">http://leevigraham.com/cms-customisation/expressionengine/addon/lg-htaccess-generator/</a>
    
    # secure .htaccess file
    <Files .htaccess>
     order allow,deny
     deny from all
    </Files>
    
    # Dont list files in index pages
    IndexIgnore *
    
    # EE 404 page for missing pages
    ErrorDocument 404 /index.php?/
    
    # Simple 404 for missing files
    <FilesMatch "(\.jpe?g|gif|png|bmp)$">
      ErrorDocument 404 "File Not Found"
    </FilesMatch>
    
    RewriteEngine On
    
    RewriteBase /
    
    # remove the www
    RewriteCond %{HTTP_HOST} ^(www\.$) [NC]
    RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    # Add a trailing slash to paths without an extension
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
    RewriteRule ^(.*)$ $1/ [L,R=301]
    
    #Add back index.php for stylesheets
    RewriteCond %{QUERY_STRING} ^(css=.*)$ [NC] 
    RewriteRule ^(.*)$ /index.php?/%1 [L]
    
    # Remove index.php
    # Uses the "include method"
    # <a href="http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method">http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method</a>
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} ^/(zz_site|zz_search|site|blog|about|includes|services||members|P[0-9]{2,8}) [NC]
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    
    # Remove IE image toolbar
    <FilesMatch "\.(html|htm|php)$">
      Header set imagetoolbar "no"
    </FilesMatch>
    
    # -- LG .htaccess Generator End --

    I am using the code generated by LG .htaccess Generator.

    Thanks for your time.

  • #4 / Jun 09, 2009 7:54am

    ellimondo

    15 posts

    Found it - the htaccess generator is putting an extra pipe in here:

    RewriteCond %{REQUEST_URI} ^/(zz_site|zz_search|site|blog|about|includes|services||members|P[0-9]{2,8}) [NC]

    Removed it and it all works tickety boo!

  • #5 / Jun 09, 2009 8:02am

    Ingmar

    29245 posts

    I was going to point this out: Your rewrite will (putting index.php back in, so to speak) will only be performed if your URL contains one of these segments. Your confirmation URL does not, so it did not work. Moving to Howto.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases