Redirect from another .something to drupal page

Public

Redirect to a url without the .aspx for example

</> CopyGet raw version
php
  1. /*
  2. * Simple redirect if the url contain .aspx remove it and redirect to the
  3. * same url without .spx
  4. * All urls are the same alias like original .net site but without .aspx
  5. */
  6. $path = current_path();
  7. if (strpos($path, '.aspx') !== FALSE) {
  8. $path = str_replace(".aspx", "", $path);
  9. drupal_goto($path);
  10. }