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: 301 redirect
Author
Message |
PlagaAvedon
Newbie


Joined: 18 February 2012
Location: Spain
Posts: 5
Posted: 18 February 2012 at 5:52am

Hello, first to all, I am sorry for my english, I am spanish and my english is very basic.


I have a web page with thousands of html pages that I am migrating now to aspx, I dont know how write rules for do this:


actual url :


http://kruela.ciberanika.com/expe1.htm


redirect to :


http://kruela.ciberanika.com/experiencias/expe1.aspx


If somebody can help me would be nice.


Thanks on advance




Edited by PlagaAvedon - 18 February 2012 at 6:01am
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 20 February 2012 at 6:04am

Hello,

Please, insert the following into your .htaccess:

Code:
RewriteEngine on
# RewriteBase /

RewriteRule ^([^./]+)\.htm$ /experiencias/$1.aspx [NC,R=301,L]


Regards
Andrew
Back to Top
 
PlagaAvedon
Newbie


Joined: 18 February 2012
Location: Spain
Posts: 5
Posted: 20 February 2012 at 8:49am

I tried that you write, and seems not work, I try to see if Isapi is on with :

RewriteRule .? - [F]

and I take Forbiden ..., this indicate that Isapi is working, no?

but when I paste your code seems not work, I changed your code a bit, but just folder name, I paste this exactly:

RewriteEngine on
# RewriteBase /

RewriteRule ^([^./]+)\.htm$ /experiencias_sobrenaturales/$1.aspx [NC,R=301,L]

how dont works, so I change to:

RewriteEngine on
# RewriteBase /

RewriteRule ^([^./]+)\.htm$ /experiencias/$1.aspx [NC,R=301,L]

any of them works for me.

One time  expresion works,  I can only change folders name and put others extension how html or shtml, for redirect others sections of web, no? or not is so simple?

and for finish, I am invaded for one dude, is this posible to do?

htttp:/ some web / somepage.htm or html or shtml

redirect to, but not 301

http:/ some web / proces.aspx?page=somepage.htm or html or shtml

Then on proces.aspx, analizating name of page, I can build the 301 redirection how I like.

Ty on advance

 



Edited by PlagaAvedon - 20 February 2012 at 9:12am
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 21 February 2012 at 4:06am

Hello,

To figure out the problem, we need to see the rewrite.log.
Logging issues described in FAQ

Regards
Andrew
Back to Top
 
PlagaAvedon
Newbie


Joined: 18 February 2012
Location: Spain
Posts: 5
Posted: 22 February 2012 at 10:37am

There is rewrite.log


(2) init rewrite engine with requested uri /expe1.htm     
(1) Htaccess process request C:\Archivos de programa\Helicon\ISAPI_Rewrite3\httpd.conf     
(3) applying pattern '^([^./]+)\.htm$' to uri '/expe1.htm'
(2) init rewrite engine with requested uri /images/fuego2.gif
(1) Htaccess process request C:\Archivos de programa\Helicon\ISAPI_Rewrite3\httpd.conf
(3) applying pattern '^([^./]+)\.htm$' to uri '/images/fuego2.gif'     
(2) init rewrite engine with requested uri /images/link_item.jpg     
(1) Htaccess process request C:\Archivos de programa\Helicon\ISAPI_Rewrite3\httpd.conf     
(3) applying pattern '^([^./]+)\.htm$' to uri '/images/link_item.jpg'


Edited by Andrushka - 23 February 2012 at 4:21am
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 23 February 2012 at 4:22am

Try to uncomment "RewriteBase /"
Back to Top
 
PlagaAvedon
Newbie


Joined: 18 February 2012
Location: Spain
Posts: 5
Posted: 23 February 2012 at 4:55am

Thanks, now works, but only for

expe1.htm to \experiencias\expe1.aspx

I have expe2.htm to \experiencias\expe2.aspx

from expe2900.htm

Is posible do all files on same rewrite line instead to do one rule for every file, no?

Ty on advance

 

Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 23 February 2012 at 5:41am

the regular expression you're using: ([^./]+)\.htm, already takes anything that is one-level URL and ends with ".htm". So it must work.

Regards
Andrew
Back to Top
 
PlagaAvedon
Newbie


Joined: 18 February 2012
Location: Spain
Posts: 5
Posted: 23 February 2012 at 6:31am

I have on web page

http:// domain / expe1.htm  expe2000.htm

move to  http:// domain/ experiencias / expe1.aspx  expe2000.aspx

and

http:// domain / cuen1.htm  cuen200.htm

move to http:// domain/ cuentos / cuen1.aspx   cuen200.aspx

and

http:// domain / leyurb1.htm - leyurb200.htm

move to http:// domain/ leyendas_urbanas / leyurb1.aspx  leyurb200.aspx

and

http:// domain / leycol1.htm leycol200.htm

move to http:// domain/ leyendas_urbanas / leycol1.aspx  leycol200.aspx

and some more, but if I know how do previus redirections, I think I can do more redirections just trying to change a bit one of previus options.

Ty on advance

 



Edited by PlagaAvedon - 23 February 2012 at 6:45am
Back to Top
 

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

Printable version Printable version