Submit Your Article Forum Rules

Results 1 to 2 of 2

Thread: Rewrite URL using ISAPI Rewrite

  1. #1
    Senior Member
    Join Date
    Sep 2003
    Location
    Global
    Posts
    220

    Rewrite URL using ISAPI Rewrite

    I am trying to redirect following URL to http://www.domain.com/ using ISAPI Rewrite

    http://domain.com/;
    http://domain.com/index.html and
    http://www.domain.com/index.html

    I get success to redirect both index.html pages url to www.domain.com but still I am unable to redirect from http://domain.com

    I have tried examples but didn't work.

  2. #2
    Senior Member NetProwler's Avatar
    Join Date
    Jan 2007
    Posts
    197
    Try this ( this snippet is a directive for a *nix /Apache server)
    Code:
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html?\ HTTP/
    RewriteRule ^(.*)index\.html?$ http://www.yoursite.com/$1 [R=301,L]
    ISAPI rewrite has additional options:
    o - Normalize the URL before processing by removing illegal characters - but strips the query string
    Last edited by NetProwler; 07-30-2012 at 04:33 AM. Reason: Added more information

Tags for this Thread

Posting Permissions

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