This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Rewrite rule
Author
Message |
NTQB
Newbie


Joined: 24 February 2010
Posts: 24
Posted: 09 March 2012 at 12:36am

Hello!

How can I redirect
Code:
http://www.website.com/photos/erich-
walter/actor/3491210/

to
Code:
http://www.website.com/photos/erich-
walter/actor/3491210/1/


Thank you!
Back to Top Visit NTQB's Homepage
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 13 March 2012 at 5:41am

Hello,

Please, try using the following:

RewriteEngine on
RewriteBase /

RewriteRule ^photos/erich-walter/actor/([^/]+)/$ /photos/erich-walter/actor/$1/1/ [NC,R=301,L]

Regards
Andrew
Back to Top
 
NTQB
Newbie


Joined: 24 February 2010
Posts: 24
Posted: 14 March 2012 at 3:23am

I don't know why but is not working. Do you have any other
suggestions?
Thank you!
Back to Top Visit NTQB's Homepage
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 14 March 2012 at 4:37am

We need to take a look at rewrite.log.
Logging issues described in FAQ

Regards
Andrew
Back to Top
 
RushKing
Newbie


Joined: 23 March 2012
Location: United States
Posts: 2
Posted: 23 March 2012 at 12:35pm

For some reason I cannot post a new topic for my
question, but it is similar to the question above so I
will put it here.

I want to create a rule that will allow my address bar to
display the following.

www.homepage.com/X where X is a letter followed by 4
digits.

The page it needs to pull up is

www.homepage.com/item.asp?ID=X

can you help with this?
Back to Top Visit RushKing's Homepage
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 26 March 2012 at 4:25am

Hello,

The reason is stated on top of this forum. We've moved.
Please, try using the following:

Code:
RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)$ /item.asp?ID=$1 [NC,L]

RewriteCond %{QUERY_STRING} ^ID=([^&]+)$ [NC]
RewriteRule ^item\.asp$ /%1? [NC,R=301,L]


Regards
Andrew
Back to Top
 
andrei.iacob
Newbie


Joined: 20 April 2012
Location: Romania
Posts: 1
Posted: 20 April 2012 at 9:36am

Hello,

I am experiencing the same problem.. i cannot add a new topic. I can only reply to the existing ones.

My problem is that i want to redirect a complex link like:

www.homepage.com/(X(1)S(22h1mk55gqhrfq55rjtzanq0))/SpecialOffers.aspx redirect_rul [L,R=301,NC]

Now i tried some rules and all of them didn't work:

#RewriteRule ^\(X\(1\)S\(22h1mk55gqhrfq55rjtzanq0\)\)/SpecialOffers.aspx$

#RewriteRule ^.*S\(22h1mk55gqhrfq55rjtzanq0\)\)/SpecialOffers.aspx$

#RewriteRule ^.*22h1mk55gqhrfq55rjtzanq0.*/SpecialOffers.aspx$

I can redirect only if i for example change the link.. instead of ((X(1)S(... i write ((x(1)S(... or ((X(1)s(... i don't know why it behaves this way.. i even tried somethig like this:

RewriteRule ^.*\)\)/SpecialOffers

and again if the linke starts with ((X(1)S(.. it won't redirect..

Any ideas??

Regards,
Andrei Iacob




Back to Top
 
RushKing
Newbie


Joined: 23 March 2012
Location: United States
Posts: 2
Posted: 20 April 2012 at 9:44am

go to the new forum to post a new topic. the link is at
the top of this page.
Back to Top Visit RushKing's Homepage
 
itvnclub
Newbie


Joined: 16 August 2012
Location: Vietnam
Posts: 1
Posted: 16 August 2012 at 4:53am

Hello all,

I want used url rewrite :

http://www.hobuinghean.com.vn/?page=4&sessionpage=637&pagecat=60&/ban-ve-cach-xung-ho-trong-gia-dinh.html

to

http://www.hobuinghean.com.vn/ban-ve-cach-xung-ho-trong-gia-dinh.html

Can you help me ?

Back to Top Visit itvnclub's Homepage
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 16 August 2012 at 5:14am

Hello,

Try using the following code:

Code:
RewriteEngine on
RewriteBase /

RewriteCond %{QUERY_STRING} ^[^/]+/(.*\.html) [NC]
RewriteRule ^$ /$1 [NC,R=301,L]



Regards
Andrew


Back to Top
 

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

Printable version Printable version