This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Help with creating URL Rewite ..
Author
Message |
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 29 April 2010 at 10:34am

linkusystems wrote:

Like this? DisableRewrite SiteNumber

DisableRewrite 678


Exactly.

Quote:
Where do I put this in the global, at the top above the rules?


You could place it anywhere below the [ISAPI_Rewrite] section marker inside the global httpd.ini.
Back to Top
 
linkusystems
Newbie


Joined: 07 October 2004
Location: United States
Posts: 30
Posted: 06 October 2011 at 11:37am

Everything has been working great so far, but now I am trying to figure out how to modify this URL:
http://leolinda.com/default.asp.pg-SunCityGrandModels

To look like this:
http://leolinda.com/pg.SunCityGrandModels (preferred)

or this:
http://leolinda.com/pg/SunCityGrandModels

or this:
http://leolinda.com/SunCityGrandModels/pg.htm

Here is the rule I am using now:

RewriteRule [^?]*/(?:default|frame|photo_large|error|external_save_lead|splash|client_flyer_style1|client_flyer_style2|client_flyer_style3)\.asp\?.* $0 [I,L]
RewriteRule ([^?]+\.asp)(?:(\?[^.]*))?\.([^-?]+)-([^.]*)(.*) $1(?2$2&:\?)$3=$4$5 [NS,I]

Do I need to modify this rule? or add a new rule? I need to make sure whatever rule I add, will not cause the old one to stop working, I need both formats to work simultaneously. Also the rule would ONLY apply to the variable 'pg' and default.asp. It does not need to work for any other pages or variables.

For example:
http://leolinda.com/default.asp.pg-SunCityGrandModels
AND
http://leolinda.com/pg.SunCityGrandModels

Both would need to work at the same time.
Back to Top Visit linkusystems's Homepage
 
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 08 October 2011 at 1:52pm

In this case you could just put one additional rule before the previous one (for the http://leolinda.com/pg.SunCityGrandModels format):

RewriteRule /pg\.(.*) /default.asp\?pg=$1 [I,L]
Back to Top
 
linkusystems
Newbie


Joined: 07 October 2004
Location: United States
Posts: 30
Posted: 10 October 2011 at 11:17am

Perfect…I have a question, for this page, do I have to include the pg-?? Or could it just be http://leolinda.com/SunCityGrandModels?

I tried changing the rule to: RewriteRule /(.*) /default.asp\?pg=$1 [I,L] and it worked, but broke the other rules.
Back to Top Visit linkusystems's Homepage
 
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 12 October 2011 at 7:45am

You could try this:

RewriteRule /([^./?]+) /default.asp\?pg=$1 [I,L]

But it still may break requests to real web folders.
Back to Top
 

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

<< Prev Page of 2
 
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum