CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • get Civi ugly URL to redirect to (already working) pretty Drupal path alias
Pages: [1]

Author Topic: get Civi ugly URL to redirect to (already working) pretty Drupal path alias  (Read 4102 times)

Sean Madsen

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 5
  • CiviCRM implementer/developer
    • Bikes Not Bombs
  • CiviCRM version: 4.6
  • CMS version: Drupal 7
get Civi ugly URL to redirect to (already working) pretty Drupal path alias
April 08, 2009, 03:43:25 pm
These cases are working for me already:
1) the content at "example.com/node/3" is available at "example.com/test"
2) visiting "example.com/node/3" does a redirect to "example.com/test"
3) the content at "example.com/civicrm/event/register?id=2&reset=1" is available at "example.com/register"

This case is not working for me:
4) visiting "example.com/civicrm/event/register?id=2&reset=1" does a redirect to "example.com/register"

I have the alias set up using a forward slash before the question mark (which seems necessary to get case #3 working), but I have tried removing the forward slash, and that still does not get case #4 working. I installed and enabled the "Global Redirect" module and the "Path Redirect" module, thinking that they'd help, but I'm still lost.

Drupal 6.9
Civi 2.2.0

dharmatech

  • I post frequently
  • ***
  • Posts: 280
  • Karma: 53
    • dharmatech.org
Re: get Civi ugly URL to redirect to (already working) pretty Drupal path alias
April 08, 2009, 06:28:37 pm
I actually don't think #4 is possible. In theory you could use the path redirect module and manually add a redirect from the civicrm path to the drupal alias but i just did a quick test and it doesn't seem to work.

But I guess my question is if the drupal alias works, why do you need #4? In other words, why do you need to go the other way - from CiviCRM path to alias?  Can't you just use the alias exclusively?

Maybe I'm not understanding what you're trying to do
tony
http://dharmatech.org
oss@dharmatech.org
801.541.8671

Sean Madsen

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 5
  • CiviCRM implementer/developer
    • Bikes Not Bombs
  • CiviCRM version: 4.6
  • CMS version: Drupal 7
Re: get Civi ugly URL to redirect to (already working) pretty Drupal path alias
April 08, 2009, 07:43:07 pm
I'd like to have case #4 so that if a person visits the ugly url, they are taken to the pretty url.

Here are some scenarios where I imagine this behavior will be necessary:
scenario 1) CiviCRM presents the user with an auto-generated link to a page and uses an ugly URL
scenario 2) A URL has already been publicized, and then we make an alias for it

Here are some reasons I can think of that I'd like this behavior
reason 1) I'm trying to include Drupal blocks in some specific Civi pages, and the only way I can get this to work is if I use an alias for the URL
reason 2) search engine optimization (we don't want to serve duplicate content on two different URLs)

acbs

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal
  • MySQL version: 5.0.51a
  • PHP version: 5.2.4-2ubuntu5.12
Re: get Civi ugly URL to redirect to (already working) pretty Drupal path alias
January 24, 2011, 10:25:07 am
Quote from: Sean Madsen on April 08, 2009, 03:43:25 pm
These cases are working for me already:

3) the content at "example.com/civicrm/event/register?id=2&reset=1" is available at "example.com/register"

Sean, any chance you could share how you managed to do #3 above?

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: get Civi ugly URL to redirect to (already working) pretty Drupal path alias
January 28, 2011, 12:13:19 am
@acbs,

I've posted a solution to #3 at http://forum.civicrm.org/index.php/topic,18344.0.html

Ken

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • get Civi ugly URL to redirect to (already working) pretty Drupal path alias

This forum was archived on 2017-11-26.