Topic: Help with creating URL Rewite ..
|

|
| Author |
|
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 8119
|
| Posted: 29 April 2010 at 10:34am | IP Logged
|
|
|
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
Online Status: Offline Posts: 30
|
| Posted: 06 October 2011 at 11:37am | IP Logged
|
|
|
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 |
|
| |
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 8119
|
| Posted: 08 October 2011 at 1:52pm | IP Logged
|
|
|
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
Online Status: Offline Posts: 30
|
| Posted: 10 October 2011 at 11:17am | IP Logged
|
|
|
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 |
|
| |
Lexey Moderator Group

Joined: 15 August 2002 Location: Russian Federation
Online Status: Offline Posts: 8119
|
| Posted: 12 October 2011 at 7:45am | IP Logged
|
|
|
You could try this:
RewriteRule /([^./?]+) /default.asp\?pg=$1 [I,L]
But it still may break requests to real web folders.
|
| Back to Top |
|
| |
|
|
If you wish to post a reply to this topic you must first login
If you are not already registered you must first register
|
|
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
|