Results 1 to 9 of 9

Thread: URL Rewrite

  1. #1
    Join Date
    Aug 2006
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default URL Rewrite

    Hi there,

    Is it possible to use the URL rewriting to make all ASPX requests such as

    http://webserver/main.aspx

    become

    http://webserver/main

    ?


    I tried using

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ $1.aspx [L,QSA]

    This however, did not appear to work


    Thanks,

    Gary

  2. #2
    Join Date
    Oct 2006
    Posts
    38
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Not quite sure what you are trying to do, but if i understand you right you what the user to type http://webserver/main in the browser and for the server to see http://webserver/main.aspx. If this is the case the rule is quite simple...

    Code:
    RewriteRule ([^\.]+) $1.aspx [i]

  3. #3
    Join Date
    Aug 2006
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply, that was exactly the scenario I am trying to reach.

    I get 404 not found with that code, when I go to http://beta.kyotopotato.com/main (http://beta.kyotopotato.com/main.aspx exists). I am trying to make it work on a subdomain, I don't know if that changes anything?

    Thanks,

    Gary

  4. #4
    Join Date
    Aug 2006
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Here is my config file -

    [ISAPI_Rewrite]
    # Helm ISAPI - Start Of Rule
    # Helm ISAPI - Rule ID: 20070208205407
    # Helm ISAPI - Rule Name: aspx rewrite
    # Helm ISAPI - Status: ACTIVE
    RewriteRule ([^\.]+) $1.aspx [i]
    # Helm ISAPI - End Of Rule

    # Helm ISAPI - Signature Hash: 5795277754F3BDFD5BC9B2577FC85093
    # WARNING: THIS FILE CANNOT BE MODIFIED OUSTIDE OF HELM AND HELM ISAPI!

  5. #5
    Join Date
    Oct 2006
    Posts
    38
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by garazy View Post
    I am trying to make it work on a subdomain, I don't know if that changes anything?
    Try copying the httpd.ini file into the root of the subdomain.

    Josh

  6. #6
    Join Date
    Aug 2006
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It was already there and is the same file

  7. #7
    Join Date
    Oct 2006
    Posts
    38
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    try changing the bracket at the end to a capital "I" if that doesn't work try changing it to a [R] that will make it redirect so you can see what is happening.

    Josh

  8. #8
    Join Date
    Aug 2006
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks man capital I was the trick.

    Gary

  9. #9
    Join Date
    Feb 2007
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You guys are superb - thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. URL Rewrite Acting Up
    By nick in forum Technical Support
    Replies: 7
    Last Post: 31st January 2007, 08:44 PM
  2. ISAPI Rewrite
    By nick in forum General Technical Support
    Replies: 2
    Last Post: 2nd January 2007, 02:03 PM
  3. Temp URL
    By senior in forum Technical Support
    Replies: 3
    Last Post: 24th January 2006, 09:15 PM
  4. URL rewriting
    By ninjalabs in forum Technical Support
    Replies: 1
    Last Post: 13th June 2005, 03:54 PM

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
  •