1

I am trying to figure out a way to redirect all the old .asp pages to a specific page in my Drupal site.

Is there a way I can accomplish this with a web.config file? I cannot use a .htaccess file because the site will still be running on IIS.

0

2 Answers 2

2

Why not use Drupal 7's core URL redirect interface? It has an option for 301 redirects: Configuration > Search and metadata > URL redirects.

I like it because it captures stats on how many redirects are happening.

1
  • It looks like that only lets me set up a redirect on a specific page. I need ALL pages with .asp in them.
    – Dustin
    Sep 18, 2014 at 17:08
1

I think you should be able to get this to work by using the Rules module.

Depending on how the format of the old .ASP pages look like, you may want to also use the Rules URL Argument module. Here is a quote about it (from its project page):

... provides two rules conditions based on URL arguments:

  • check if a URL argument is present.
  • compare the value of an URL argument.

It also provides an action that makes the value of an URL argument available as new variable to Rules.

The newly provided Rules actions and conditions can be found under the "URL Argument" conditions and actions groups in the rule configuration interface.

For more details, refer to my answer to the question "How to use the Rules module to implement a custom redirect for an outdated URL?".

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