This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Rewrite Inherits in to sub directory
Author
Message |
hetalpatel33
Groupie


Joined: 19 November 2008
Location: United States
Posts: 43
Posted: 24 April 2012 at 1:21pm

Hi

I have write script in version 3.0 for redirecting url from asp pages to .htm and .html url extension,

Article pages are redirect to .htm and products redirect to .html pages.

It is on root directory of www., which is inheriting in sub directory as well, How i can stop inheriting in sub directory

Or is there anyway i can limit to specific asp file only

Only a.asp?Parsename=a should go to a.html


here is the script

 

# Helicon ISAPI_Rewrite configuration file

# Version 3.1.0.88

RewriteEngine On

RewriteCompatibility2 On

RepeatLimit 200

RewriteBase

# unsupported directive: [ISAPI_Rewrite]

# Defend your computer from some worm attacks

RewriteRule ^.*(?:global.asa|default\.ida|root\.exe|\.\.).*$ . [NC,F,O]

RewriteCond %{HTTP_HOST} domainname.com RewriteRule ^(?!.*fckeditor.*)(.*)\.htm /content.asp?ParseName=$1 [NC,L]



__________________
Name it self is enough
Back to Top Visit hetalpatel33's Homepage
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 25 April 2012 at 7:08am

Hello,

you may try using the following conditions:

Code:
RewriteCond %{HTTP_HOST} ^(?:www\.)?domainname.com$ [NC]


and you 1 file rule would be:

Code:
RewriteRule ^a.asp?Parsename=(.*) /$1.html? [NC,R=301,L]
Back to Top
 
hetalpatel33
Groupie


Joined: 19 November 2008
Location: United States
Posts: 43
Posted: 13 August 2012 at 5:25pm

Hello, I don't know about above one resovled or not, i moved to new project, but i am looking for solution for follwing schenario

I want to convert following script of 2 lite version to paid version 3.1.0.76

RewriteCond Host:http://www.example.com
RewriteRule /announcement/(.*)\.htm /announcement/announcement.asp?ParseName=$1

RewriteCond Host:http://www.example.com
RewriteRule /contact_directory/(.*)\.htm /contact_directory/parse.asp?ParseName=$1

RewriteCond Host:http://www.example.com
RewriteRule /contact_directory/(.*)\.html /contact_directory/directory_parse.asp?ParseName=$1

RewriteCond Host:http://www.example.com
RewriteRule /news/(.*)\.htm /news/parse.asp?ParseName=$1

RewriteCond Host:http://www.example.com
RewriteRule /(.*)\.open /images/logo.asp?ParseName=$1

RewriteCond Host:http://www.example.com
RewriteRule /(.*)\.htm /parse.asp?ParseName=$1

I could able to do only this..

RewriteCond %{HTTP_HOST} example.com
RewriteRule ^(?!.*fckeditor.*)(.*)\.htm /parse.asp?ParseName=$1 [NC,L]

Please help me on it.

Thanks,



Edited by hetalpatel33 - 13 August 2012 at 5:26pm


__________________
Name it self is enough
Back to Top Visit hetalpatel33's Homepage
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 14 August 2012 at 2:33am

Hello,

It could be just a single '/' that screws the rules. Try using smth like the following:

Code:
RewriteCond Host:http://www.example.com
RewriteRule news/(.*)\.htm /news/parse.asp?ParseName=$1 [NC,L]


Regards
Andrew
Back to Top
 
hetalpatel33
Groupie


Joined: 19 November 2008
Location: United States
Posts: 43
Posted: 14 August 2012 at 9:45am

Unfortunately your code is not working (its 3.1 version)

RewriteCond %{HTTP_HOST} example.com
RewriteRule ^(?!.*fckeditor.*)(.*)\.htm /parse.asp?ParseName=$1 [NC,L]

I tried this too

RewriteCond %{HTTP_HOST} example.com
RewriteRule ^(?!.*fckeditor.*)news/(.*)\.htm /news/parse.asp?ParseName=$1 [NC,L]

RewriteCond %{HTTP_HOST} example.com
RewriteRule ^news/(?!.*fckeditor.*)(.*)\.htm /news/parse.asp?ParseName=$1 [NC,L]

 



__________________
Name it self is enough
Back to Top Visit hetalpatel33's Homepage
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 14 August 2012 at 3:06pm

In this case, please, provide rewrite.log for the testing request. Logging issues described in FAQ - http://www.helicontech.com/forum/10648-FAQ.html

Regards
Andrew
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version