Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6168697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:43:56+00:00 2026-05-23T22:43:56+00:00

I need a bit of ISAPI syntax help, I am about to put live

  • 0

I need a bit of ISAPI syntax help, I am about to put live a new site and want to archive the old forum onto an archive sub domain.

The forum is in ASP and currently has this URL

http://www.mywebsite.co.uk/forum/forum_posts.asp?TID=34419
http://www.mywebsite.co.uk/forum/forum_topics.asp?FID=47

I want every request for the forum to be 301 redirected to:

http://archive.mywebsite.co.uk/forum/forum_posts.asp?TID=34419
http://archive.mywebsite.co.uk/forum/forum_topics.asp?FID=47

Basically anything with in the forum folder with .asp extension with or without a query string – Any help greatly appreciated.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:43:58+00:00Added an answer on May 23, 2026 at 10:43 pm

    For redirecting a url to a subdomain, it has been a few months since your question, but maybe this will still help.

    Assuming you’re using isapi_rewrite v3, try this:

    RewriteCond %{HTTP:Host} ^www\.
    RewriteRule ^/forum/(.*\.asp)$ http://archive.mywebsite.co.uk/forum/$1 [NC,R=301]
    

    The first line looks for host beginning with www. (with the trailing dot). This makes sure you don’t get an infinite loop, redirecting archive to itself. The trailing dot is being picky at doing only www, and not others like www2.

    The second line looks for /forum/, then captures (...) any characters .* and literal dot and asp \.asp, ending the url $

    It then goes to your subdomain in the /forum/ folder (since /forum/ wasn’t captured, we need to repeat it), and the entire rest of the url that was captured $1.

    The NC means not case-sensitive, so all this can be mixed upper and lower case.
    The R=301 means redirect, and make it a permanent 301 redirect since this isn’t temporary.

    In the v3 rules, querystring parameters are handled entirely separately from the rules, so you don’t have to do anything at all here. If there are no parameters, then this works. If there are parameters, they are passed on as in your question above.

    This ignores http vs https. It will redirect to http, so if the original was https, there will probably be a browser warning. There are ways to handle it, but I didn’t want to clutter the basic answer.

    Having the domain itself in the rewrite rule is always a little weird looking to me, since you might want to move it around. You can capture the rest of the host in the first line, and use it in the second.

    RewriteCond %{HTTP:Host} ^www\.(.*)$
    RewriteRule ^/forum/(.*\.asp)$ http://archive.%1/forum/$1 [NC,R=301]
    

    This is similar to above, with the addition that the host after the www-dot is captured, to the end of the line (.*)$ I’m not sure the $ is required here, but it makes it explicit we want it all.

    RewriteCond captures are numbered with a percent sign, so %1 in the rewrite rule substitutes the host after the subdomain, and $1 still means substituting the captured …asp url.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a bit of help with NSTask. Also, I am new to Cocoa
I need a bit of help with KVO, I'm about half way there. What
Just need alittle bit of help with rspec testing... very new to it and
I need a bit of syntax help with a ternary operator which will help
I'm new to MVVM and need a bit of help. My application consists of
I'm a SQL noob, and I need a little bit of help understanding the
I need some help understanding this bit of code pre { white-space: pre; white-space:
I need a bit of help understanding how utf8 data is supposed to look
I need a bit help with dynamically generating column-based table instead of row-based table.
I need a bit of help using symfony to calculate an end date. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.