Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Location
    Denmark
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    From .php to .asp

    Hello People

    Im trying to make the .htcacces fil on my web domain. So that it recorrect all my .php site to .asp site.

    I'm currently running a phpwcms site build, i have the site build. I have pagerank for all my site. I've got help to the .htcaccess file so that i rewrites all my .php endings to .asp site. So that i can call it different names like Landing-page.asp instead of /php?=958109581123.php, i would like to know if anyone could teach me how to make that code myself. I'm currently in building a new site, and i can't transfer that .htcacces file to the new website cause it setup to my other site, it simply mailfunctions.

    All assistance would be greatly appreaciated!

    Thanks in advance

    Cetigo/ Niclas

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,996
    Thanks
    79
    Thanked 4,433 Times in 4,398 Posts
    WHY would you want to do this? Do you know how to use ASP pages? They are similar to PHP, but there are MANY MANY important differences. You'd essentially have to learn a new computer language.

    I have a hunch you don't know what ASP pages are. Am I wrong?

    I think all you want to do is map things like "/php?=958109581123.php" to "landingPage.php" or maybe vice versa. But why would you mix PHP and ASP pages?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Regular Coder
    Join Date
    Apr 2005
    Location
    Texas
    Posts
    448
    Thanks
    24
    Thanked 63 Times in 63 Posts
    Quote Originally Posted by Old Pedant View Post
    I think all you want to do is map things like "/php?=958109581123.php" to "landingPage.php" or maybe vice versa.
    if that is the question, then what would be the answer?
    Allwisend bin ich nicht, doch viel ist mir bewursst
    -Goethe

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,996
    Thanks
    79
    Thanked 4,433 Times in 4,398 Posts
    Depends on whether he is using an IIS server (Windows) or an Apache server (Linux, ususally, but can be also used on Windows). Apache is much simpler. You just specify mapping rules in a special file. I *think* that with IIS 7 you can do something quite similar, but I haven't pursued that yet.

    Anyway, it's called "URL Rewrite" or "URL Rewriting" if you want to google it. Be sure to include "IIS" or "Apache" in your google search terms.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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