This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions (Forum Locked Forum Locked)
 Helicon Tech : Common Questions
Subject Topic: need help urlrewrite
Author
Message |
asifsolkar
Newbie


Joined: 06 November 2009
Location: India
Posts: 8
Posted: 06 November 2009 at 11:43am


My URL is

http://www.mydomain.com/about.html

should be writen as

http://www. mydomain.com/html/static-pages.asp?
PageName=About Us

i need to show this to client , then i can go ahead with
purchase

Thanks in advance
Back to Top
 
asifsolkar
Newbie


Joined: 06 November 2009
Location: India
Posts: 8
Posted: 08 November 2009 at 12:36am

Sorry for the earlier one

http://www.mydomain.com/html/about-us.htm

shd be rewriten

as http://www.mydomain.com/html/static-pages.asp?
PageName=About Us
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 09 November 2009 at 2:41am

Please try to use this:

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^html/([^./]+)$ /html/static-pages.asp?PageName=$1 [NC,L]

__________________
Regards,
Anton
Back to Top
 
asifsolkar
Newbie


Joined: 06 November 2009
Location: India
Posts: 8
Posted: 09 November 2009 at 4:34am

Anton thanks for reply , But i still get 404 page not
found

Even in Regex test this code

RewriteRule ^html/([^./]+)$ /html/static-pages.asp?
PageName=$1 [NC,L]

returns Pattern not matched

i have .htacess file in root folder

I just want when ever a link is clicked it should go to
html/static-pages.asp?pagename=about us

for the pages present it should go to the respective
page.

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 09 November 2009 at 4:52am

Please try to fix the config like this for "about us" page:

RewriteRule ^html/about-us$ /html/static-pages.asp?PageName=about\ us [NC,L]

And please clarify whether you need the rule to work for other pages as well. Please give some more examples.

__________________
Regards,
Anton
Back to Top
 
asifsolkar
Newbie


Joined: 06 November 2009
Location: India
Posts: 8
Posted: 09 November 2009 at 5:03am

Sorry if i confused u

these are 2 sample urls
1) http://www.mydomain.com/html/faq.htm
2) http://www.mydomain.com/gifts-for-him.htm

content for these pages is available on this page

http://www.mydomain.com/html/static-pages.asp?
PageName=querystring

i am using # Version 3.1.0.67 i will purchase this
component as soon as i m done with this

thanks
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 09 November 2009 at 5:50am

I guess this rule should satisfy your needs:

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ([^./]+)\.htm$ /html/static-pages.asp?PageName=$1 [NC,L]

If it doesn't work, please specify what part of requested URL should be passed to querystring ("html/faq.htm" or "faq.htm" or "faq").
And please provide rewrite log records for the non-working request.

__________________
Regards,
Anton
Back to Top
 
asifsolkar
Newbie


Joined: 06 November 2009
Location: India
Posts: 8
Posted: 09 November 2009 at 6:18am

Anton that has worked but now ,

how can i rewrite a certain url to specific page

http://www.mydomain.com/view-cart.htm to

http://www.mydomain.com/cart/viewcart.asp
and so on

there are few more such urls
thanks

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 09 November 2009 at 8:37am

The rule will look like this:

RewriteRule ^view-cart\.htm$ /cart/viewcart.asp [NC,L]

Notice that this rule should be put before the rules in the previous post.

__________________
Regards,
Anton
Back to Top
 
asifsolkar
Newbie


Joined: 06 November 2009
Location: India
Posts: 8
Posted: 09 November 2009 at 8:50am

how can i rewrite this

http://www.mydomain.com/between 200-299/9.htm to rewrite as
http://www.mydomain.com/cart/products.asp

http://www.mydomain.com/between 0-99/3.htm to rewrite as
http://www.mydomain.com/cart/products.asp

the numbers are dynamic 200-299 300-399 etc , thanks so much for your help. I tried searching but couldnt
find any such example


Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 10 November 2009 at 5:48am

So, rewriting in both cases should be to the same location?
Please try to use the following rules:

RewriteBase /

RewriteRule ^2\d{2}/9\.htm$ /cart/products.asp [NC,L]
RewriteRule ^\d(\d)?/3\.htm$ /cart/products.asp [NC,L]

__________________
Regards,
Anton
Back to Top
 
asifsolkar
Newbie


Joined: 06 November 2009
Location: India
Posts: 8
Posted: 10 November 2009 at 6:11am

nope doesnt work

http://www.mydomain.com/between 0-99/3.htm to rewrite as
http://www.mydomain.com/cart/products.asp

between 0-99 , (100-199 , 200,299) these numbers are
dynamic
also 3.htm can be any number 3, 5, 6 , 12 ,33.
Back to Top
 
asifsolkar
Newbie


Joined: 06 November 2009
Location: India
Posts: 8
Posted: 12 November 2009 at 5:52am

check this url
http://www.mydomain.com/between 0-99/3.htm to rewrite as
http://www.mydomain.com/cart/products.asp

Will this work for me

RewriteRule ([^/]+)/([^/]+)\.htm /cart/products.asp [I,L]


Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 13 November 2009 at 5:51am

I would suggest this:

RewriteRule ^\d+/\d+\.htm$ /cart/products.asp [NC,L]

Also please clarify what version of ISAPI_Rewrite you are using - 2 or 3.

__________________
Regards,
Anton
Back to Top
 

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

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