Using Alais stored in DB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ilearneditonline
    Recognized Expert New Member
    • Jul 2007
    • 130

    Using Alais stored in DB

    I was using Drupal for one of my websites. There I was able to define aliases for my nodes and that is what would display in the address bar. I am moving away from Drupal, but want to use the aliases that I have already defined.

    Is this possible through Apache, and if so can someone please point me to something that explains how to do this. Everything I have googled as returned me nada on results, so I am sure I am looking for the wrong thing.
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Originally posted by ilearneditonlin e
    I was using Drupal for one of my websites. There I was able to define aliases for my nodes and that is what would display in the address bar. I am moving away from Drupal, but want to use the aliases that I have already defined.

    Is this possible through Apache, and if so can someone please point me to something that explains how to do this. Everything I have googled as returned me nada on results, so I am sure I am looking for the wrong thing.
    I have no experience with Drupal, but what I imagine you are looking for is mod_rewrite to handle URL rewriting.

    Comment

    • ilearneditonline
      Recognized Expert New Member
      • Jul 2007
      • 130

      #3
      Originally posted by Motoma
      I have no experience with Drupal, but what I imagine you are looking for is mod_rewrite to handle URL rewriting.
      That is what i figured I would need, but can't find anything on how to pull that from a database.

      Comment

      • Motoma
        Recognized Expert Specialist
        • Jan 2007
        • 3236

        #4
        Originally posted by ilearneditonlin e
        That is what i figured I would need, but can't find anything on how to pull that from a database.
        No, you won't be able to.

        Comment

        • docdiesel
          Recognized Expert Contributor
          • Aug 2007
          • 297

          #5
          You could do a "SELECT dst, src FROM url_alias" once, store the result in a file named old_drupal_mapp ings.cfg and rewrite them in Apache with "RewriteMap alias-to_node txt:/path/to/old_drupal_mapp ings.cfg". (In case that you're planning to store the old drupal content under its old node/... pathes.)

          Regards,

          Bernd

          Comment

          • Motoma
            Recognized Expert Specialist
            • Jan 2007
            • 3236

            #6
            Originally posted by docdiesel
            You could do a "SELECT dst, src FROM url_alias" once, store the result in a file named old_drupal_mapp ings.cfg and rewrite them in Apache with "RewriteMap alias-to_node txt:/path/to/old_drupal_mapp ings.cfg". (In case that you're planning to store the old drupal content under its old node/... pathes.)

            Regards,

            Bernd
            Great suggestion Bernd, welcome to The Scripts!

            Comment

            Working...