0

All of a sudden my search and member login forms always redirect to the home page rather than the redirect url or search results? Any advice what's up?

{exp:member:login_form return="courses/online/55"}

<input name="username" class="form-login" title="Username" value="" size="30" maxlength="2048" id="username" /></div>
<div id="login-box-name">Password:</div><div id="login-box-field"><input name="password" type="password" class="form-login" title="Password" value="" size="30" maxlength="2048" id="password" /></div>
<br />
<span class="login-box-options"><input type="checkbox" name="1" value="1"> Remember Me <a href="{path=login/forgot_password}" style="margin-left:30px;">Forgot password?</a></span>
<br />
<br />
<input type="image" name="submit" value="Submit" src="/images/login-btn.png"  style="margin-left:90px;" />
{/exp:member:login_form}

Content of the htaccess file.

##Solspace Static Page Caching: Site #1##
<IfModule mod_rewrite.c>

    RewriteEngine On
    RewriteBase /

## RULE #1 - gzip

    ## Accepts GZ output
    RewriteCond %{HTTP:Accept-Encoding} gzip

    ## Ignore POST requests
    RewriteCond %{REQUEST_METHOD} !=POST

    ## Ignore EE Query requests
    RewriteCond %{QUERY_STRING} !^(css|ACT)

    ## Override Cookie That Disables Caching
    RewriteCond %{HTTP:Cookie} !^.*(static_page_caching_override).*$

    ## Override Segment for ToolBar
    RewriteCond $1 !spc_override/*$

    ## Remove the index.php from the next conditional check, neutralize slashes
    RewriteCond $1 ^(index.php/)*(.*)(/*)$

    ## Cache File Exists?
    RewriteCond /home/hookingr/public_html/static_page_caching/1/$2/index.html.gz -f

    ## Redirect to Cache File
    RewriteRule ^(index.php/*)*(.*)(/*) /static_page_caching/1/$2/index.html.gz [L]

## RULE #2 - normal

    ## Ignore POST requests
    RewriteCond %{REQUEST_METHOD} !=POST

    ## Ignore EE Query requests
    RewriteCond %{QUERY_STRING} !^(css|ACT)

    ## Override Cookie That Disables Caching
    RewriteCond %{HTTP:Cookie} !^.*(static_page_caching_override).*$

    ## Override Segment for ToolBar
    RewriteCond $1 !spc_override/*$

    ## Remove the index.php from the next conditional check, neutralize slashes
    RewriteCond $1 ^(index.php/)*(.*)(/*)$

    ## Cache File Exists?
    RewriteCond /home/hookingr/public_html/static_page_caching/1/$2/index.html -f

    ## Redirect to Cache File
    RewriteRule ^(index.php/*)*(.*)(/*) /static_page_caching/1/$2/index.html [L]

## RULE #3 - Remove SPC Override Segment from URI
    RewriteRule ^(.+)/spc_override$ /$1 [L]

</IfModule>
##END Solspace Static Page Caching: Site #1##


#allow from 192.185.1.20
#deny from all
RewriteEngine On 

#RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /index.php/$1 [L]
8
  • Do you have a 404 behaviour set for the site in the event you have strict URLs enabled? Push to the homepage is the default if you don't have it pointed elsewhere. Can you post a snippet of your member login form code, for example? – Jean St-Amand Jan 28 '14 at 16:17
  • I believe it has something to do with my htaccess file. I started to use the Static Page Cache module and as soon as I did this happened. If I remove the module AND the contents of the htaccess file it works again. I also remove index.php with my htaccess file. – Peter Eastwood Jan 28 '14 at 16:45
  • If you leave the module in place but remove the content of your htaccess file (or just rename it) does it still work? The hatches file is the same one you were using successfully with the site, removing index.php, before you installed the static caching module? – Jean St-Amand Jan 28 '14 at 17:02
  • Correct, it is not the module itself, it is what the module is doing to the htaccess file. – Peter Eastwood Jan 28 '14 at 17:05
  • Gotcha. What does it change in your htaccess file (I've not used the add-on, but I see by the docs that it actually writes changes to it)? There's an archived forum post (solspace.com/forums/viewthread/15807) that may be somewhat similar - I guess it depends on which method you re using for the index.php rewrite. – Jean St-Amand Jan 28 '14 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.