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: url rewite problem (Topic Closed Topic Closed)
Author
Message |
Pushpender
Newbie


Joined: 27 July 2009
Posts: 2
Posted: 27 July 2009 at 3:47am  

Hi All,

I am having an e commerce website www.oflowers.in. I have
done url rewriting for product page whose url is like http://www.oflowers.in/Raksha-Bandhan/2/7/raksha-bandhan-
gifts.htm .Now my url has changed to another url.So how to
write new url for already written url in http.ini file.

Help from anybody would be hugely appreciated.
Thanks
Back to Top
 
Dima
Senior Member


Joined: 27 May 2009
Posts: 162
Posted: 27 July 2009 at 9:27am  

Please show us your rules. Also please give an example of your old and new urls. And please specify version and build of your ISAPI_Rewrite.

__________________
HeliconTech moderator group.
Back to Top
 
Pushpender
Newbie


Joined: 27 July 2009
Posts: 2
Posted: 28 July 2009 at 12:22am  

Hi Dima,

My old written url is http://www.oflowers.in/subcat-2-7/raksha-bandhan-gifts.htm and i want to my new url like this http://www.oflowers.in/Raksha-Bandhan/2/7/raksha-bandhan-
gifts.htm.

The rules which i have written for new url is:

RewriteRule /fnp/(.*)/(.*)/(.*)/(.*).htm /fnp/Product.aspx?ID=$2&subcatid=$3

But the problem is that both the old and new url's are working instead what i want is to redirect  the old url to the new url.

I have written the url for the above mentioned task as:

RewriteRule /fnp/SubCat-2-7/Raksha-Bandhan.htm http://localhost/fnp/Raksha-Bandhan/2/7/raksha-bandhan-gifts.htm [I,O,RP,L]

This is working fine on my local machine but when i am uploading it on the server it displays:

The page has been moved to http://www.oflowers.in/Raksha-Bandhan/2/7/raksha-bandhan-gifts.htm.

Please help.

Thanks

    

Back to Top
 
Dima
Senior Member


Joined: 27 May 2009
Posts: 162
Posted: 30 July 2009 at 7:18am  

Please specify your version and build of ISAPI_Rewrite.
For v.3 please try to use these rules:

RewriteBase /
#rule for your new urls
RewriteRule ^fnp/[^/]+/(\d+)/(\d+)/.+\.htm$ fnp/Product.aspx?ID=$1&subcatid=$2 [NC,L]
#redirecting rule for your old url
RewriteRule ^fnp/.+-(\d+)-(\d+)/(.+\.htm)$ fnp/Raksha-Bandhan/$1/$2/$3 [NC,L,R=301]


For v.2 please try to use these rules:

[ISAPI_Rewrite]
#rule for your new urls
RewriteRule /fnp/[^/]+/(\d+)/(\d+)/.+\.htm /fnp/Product.aspx?ID=$1&subcatid=$2 [I,L]
#redirecting rule for your old url
RewriteRule /fnp/.+-(\d+)-(\d+)/(.+\.htm) /fnp/Raksha-Bandhan/$1/$2/$3 [I,RP]


__________________
HeliconTech moderator group.
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