User login

redirect

Exporting Redirects to Webserver Rules the Awesome way

[Note: For non-automatic export of Redirects to Apache rules, see Redirect Export module.]

courtesy Stefan, of course

Resources:
http://php.net/manual/en/book.dba.php

Return user to current page: How to link to a form from a Drupal menu

Press login / press account links for anonymous and logged in users, respectively. Subtly added to a bottom menu. Via code in order to allow for the redirect back to the page you were on after login or editing.

There is surely a way, or should be a way, that does not involve hook_page_alter(), but hey, this works.

Infinite redirect loop trying to go to anything but the front page

Help. I've spent the last several - five - hours just trying to get my dev environment working. In Drupal 6 (which i have to do something on to bail Dan out, who is incapacitated with pain) it always goes to the front page. Which makes working on a site difficult. Drupal 7 works. Any thoughts?

2:50
oh goddamn bloody hell shoot me in the face

it was using the .htaccess from agaric rather than a clean d6

not that just committing a .htaccess would seem to be an out of the question for this project, which would have saved me all that pain

unexplained double-slash-in-path page not founds

Seeing node and user pages with double slashes occasionally in my Drupal log as page not found.

Sometimes the referrer is listed as a page that redirects (i've got a crazy example.com/57 redirecting to node/67 thing going on in hook_init or somewhere unholy), sometimes a normal page, sometimes a page with even worse double slashes (which comes up page not found itself)

Redirect URLs in in Apache server .htaccess file

Within the mod_rewrite directive....

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

...right below where Drupal's default .htaccess has the rewrite base option, we can add this:

  # Redirects from old site
  RewriteRule ^leadership.php$ /community/leadership [NC,R=301,L]

We can have as many rules like that as we want. It's not the fastest way to redirect but it's faster than making Drupal do it internally.

Redirect multiple domain names to single canonical domain for your site

This Apache rule describes how to have all selected domains and subdomains for a site come up in the site visitor's browser address bar as your one chosen canonical domain.

Here is an all-in-one-line approach:

Configuring Global Redirect and Path Redirect

The modules in question:
Global Redirect: http://drupal.org/project/globalredirect
Path Redirect: http://drupal.org/project/path_redirect

Download and place your modules in the sites/all/modules directory of your site using your chosen method. Agaric recommends Drush.

Syndicate content