SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    301 Redirect Single Page and Append Querystring

    I have a classic asp (VBScript) site that I've changed the name of a page on (company_details.asp to modest_clothing_company_details.asp). There is a query string that is appended to this page that displays a companies information (company_details.asp?ID_company=100). I've been trying to create a 301 redirect for any requests that come to company_details.asp to modest_clothing_company_details.asp and then append the querystring to the end of it, but have not been successful. Can anyone help me with this?

  2. #2
    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)
    S_BS,

    ASP pages? Okay, this used to be an Apache board and your question looks like a mod_rewrite question. Have a look at the tutorial linked in my signature then create code (depending upon your version of IIS) to:

    1. Match the ID_company=100 query string with a RewriteCond
    2. Match the company_details.asp {REQUEST_URI} as the regex of a RewriteRule
    3. Redirect to modest_clothing_company_details.asp and add the new query string (leave it alone if it's still IC_company=100)

    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
  •