SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict Iceman90's Avatar
    Join Date
    Mar 2006
    Location
    Calgary, Alberta, Canada
    Posts
    391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    htaccess to redirect all ASP files to home?

    Hello,

    I am looking for a .htaccess configuration that will redirect a user who goes to any .asp page, back to my homepage. How can I do this?

  2. #2
    SitePoint Enthusiast WindowsHosting's Avatar
    Join Date
    Feb 2009
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    Your request is not very clear. Have you installed ASP on Linux?

    Regards
    Find Free ASP.NET hosting information and resources at http://www.windowshostingasp.net.

  3. #3
    SitePoint Addict Iceman90's Avatar
    Join Date
    Mar 2006
    Location
    Calgary, Alberta, Canada
    Posts
    391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry,

    We have an old Windows server, and a website in ASP. Now the client has changed to a PHP based CMS, and we want to redirect all the old ASP pages to the homepage.

  4. #4
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,645
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Iceman,

    Simple:
    Code:
    RewriteEngine on
    RewriteRule \.asp$ homepage.php [R=301,L]
    Gee, that was SO simple one wonders why you didn't use the tutorial link in my signature to find that for yourself (the code is in there, too).

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •