8

Most CiviCRM URLs have reset=1 in the query string.

E.g. http://[yoursite.com]/civicrm?reset=1

What does this do and does it matter if you don't include it?

I only ask because URLs look nicer without it.

9

reset=1 clears the current local session variables as well as the smarty cache.

For instance, if you have a form that is getting reused, reset=1 will clear the form's fields (whereas, without it, the form may contain values carried over from it's prior invocation).

If you don't use it, and it's a public, anonymous facing page, I suspect you may get away with it. Try it and see how it works for you.

If the parameter is necessary, you could add it as a redirect to your installation. For instance, in your .htaccess file include something like:

Redirect 301 /contribute https://[yoursite.com]/civicrm/contribute/transact?reset=1&id=5

Which would allow https://[yoursite.com]/contribute as a valid link to the ultimate contribution page.

  • Thanks for your answer. I was thinking of the user facing pages rather than the public pages. As you say, you can redirect the public facing pages in Drupal using an alias. – William Mortada Feb 10 '16 at 14:23
  • 1
    I don't think there is a way to effectively get rid of it on CiviCRM's pages. You could create some custom pages, a portal in effect, for your users, but that's a lot of work and probably not worth the effort. – DaveD - BackOffice Thinking Feb 10 '16 at 14:26
  • 2
    I don't think this is entirely correct - the big thing that's not mentioned here is that the smarty cache is cleared with the reset=1. Also, you can't use Drupal path aliases, because Drupal path aliases don't allow query strings. You can setup redirects, which is almost as good. – Alan Dixon Feb 16 '16 at 17:36
  • 1
    Alan is right, Drupal Aliases do not work because of the question mark - when I really need a nice URL I end up putting a redirect in my .htaccess file like so: Redirect 301 /contribute https://watershedmg.org/civicrm/contribute/transact?reset=1&id=5 – desierto Feb 16 '16 at 23:55

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.