SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: redirect a .asp site to .php site

  1. #1
    SitePoint Zealot theslip's Avatar
    Join Date
    Jun 2008
    Location
    here
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    redirect a .asp site to .php site

    Hi there, how can I correctly redirect a .asp website to a .php website, all my pages will be the same name and paths, only difference is they are now php on unix server instead of windows? cheers

  2. #2
    Twitter: @TimIgoe silver trophy
    TimIgoe's Avatar
    Join Date
    Feb 2005
    Location
    Blackpool, UK
    Posts
    1,024
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    You have set your new server to run .asp as php ? In that case, its just a case of telling Apache (or whatever your server is) to throw .asp pages through the php parser.


    AddType application/x-httpd-php .asp

  3. #3
    SitePoint Zealot theslip's Avatar
    Join Date
    Jun 2008
    Location
    here
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah good move, I guess then my pages would still be called .asp and no redirection required? is that right? is there any reasons not to do this or gottchya's with this method? thanks for reply.

  4. #4
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    340
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The php interpreter won't run any asp code in your pre-existing asp pages.
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon

  5. #5
    Twitter: @TimIgoe silver trophy
    TimIgoe's Avatar
    Join Date
    Feb 2005
    Location
    Blackpool, UK
    Posts
    1,024
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by theslip View Post
    ah good move, I guess then my pages would still be called .asp and no redirection required? is that right? is there any reasons not to do this or gottchya's with this method? thanks for reply.
    Indeed, thats the point of the suggestion, then there is no redirect faff to be done

  6. #6
    SitePoint Zealot theslip's Avatar
    Join Date
    Jun 2008
    Location
    here
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks Timlgoe nice one, cheers Doug G for input

  7. #7
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,315
    Mentioned
    15 Post(s)
    Tagged
    2 Thread(s)
    ts,

    There's always the simple redirection in the sample code section of my signature's mod_rewrite tutorial (which I would use rather than messing with AddType handlers).

    Regards

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    Updated 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
  •