This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions
 Helicon Tech : Common Questions
Subject Topic: need help urlrewrite Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
asifsolkar
Newbie
Newbie


Joined: 06 November 2009
Location: India
Online Status: Offline
Posts: 8
Posted: 06 November 2009 at 11:43am | IP Logged Quote asifsolkar


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 View asifsolkar's Profile Search for other posts by asifsolkar
 
asifsolkar
Newbie
Newbie


Joined: 06 November 2009
Location: India
Online Status: Offline
Posts: 8
Posted: 08 November 2009 at 12:36am | IP Logged Quote asifsolkar

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 View asifsolkar's Profile Search for other posts by asifsolkar
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 09 November 2009 at 2:41am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 
asifsolkar
Newbie
Newbie


Joined: 06 November 2009
Location: India
Online Status: Offline
Posts: 8
Posted: 09 November 2009 at 4:34am | IP Logged Quote asifsolkar

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 View asifsolkar's Profile Search for other posts by asifsolkar
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 09 November 2009 at 4:52am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 
asifsolkar
Newbie
Newbie


Joined: 06 November 2009
Location: India
Online Status: Offline
Posts: 8
Posted: 09 November 2009 at 5:03am | IP Logged Quote asifsolkar

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 View asifsolkar's Profile Search for other posts by asifsolkar
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 09 November 2009 at 5:50am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 
asifsolkar
Newbie
Newbie


Joined: 06 November 2009
Location: India
Online Status: Offline
Posts: 8
Posted: 09 November 2009 at 6:18am | IP Logged Quote asifsolkar

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 View asifsolkar's Profile Search for other posts by asifsolkar
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 09 November 2009 at 8:37am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 
asifsolkar
Newbie
Newbie


Joined: 06 November 2009
Location: India
Online Status: Offline
Posts: 8
Posted: 09 November 2009 at 8:50am | IP Logged Quote asifsolkar

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 View asifsolkar's Profile Search for other posts by asifsolkar
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 10 November 2009 at 5:48am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 
asifsolkar
Newbie
Newbie


Joined: 06 November 2009
Location: India
Online Status: Offline
Posts: 8
Posted: 10 November 2009 at 6:11am | IP Logged Quote asifsolkar

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 View asifsolkar's Profile Search for other posts by asifsolkar
 
asifsolkar
Newbie
Newbie


Joined: 06 November 2009
Location: India
Online Status: Offline
Posts: 8
Posted: 12 November 2009 at 5:52am | IP Logged Quote asifsolkar

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 View asifsolkar's Profile Search for other posts by asifsolkar
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 13 November 2009 at 5:51am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
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