| Author |
|
Alien Newbie

Joined: 18 September 2008
Online Status: Offline Posts: 3
|
| Posted: 18 September 2008 at 11:21am | IP Logged
|
|
|
Hello everyone,
I'm trying ISAPI_Rewrite 3 Lite on my local machine.
I have this URL
http://localhost/news/current_item.asp?clicked_link_id=10
and I want it to be transformed into
http://localhost/news/10
I've tried different examples but without success. Info in similar topics on this forum was not helpful so far.
Any help would be appreciated very much.
|
| Back to Top |
|
| |
domus71 Newbie

Joined: 14 July 2008 Location: Greece
Online Status: Offline Posts: 4
|
| Posted: 18 September 2008 at 1:44pm | IP Logged
|
|
|
Hello Alien,
Try this:
Code:
RewriteRule ^news\/(\d*) /news/current_item.asp?clicked_link_id=$1 [NC]
|
|
|
Costis Papadakis www.airpics.gr www.airpics.net
P.S. Try
Code:
RewriteLogLevel 9
LogLevel debug
|
|
|
and check Rewrite.log (in ISAPI_Rewrite3 installation directory) for rewrite log file
Edited by domus71 - 18 September 2008 at 1:47pm
|
| Back to Top |
|
| |
Alien Newbie

Joined: 18 September 2008
Online Status: Offline Posts: 3
|
| Posted: 19 September 2008 at 3:20am | IP Logged
|
|
|
Hello Costis,
Thanks for your reaction. Unfortunately, this rewrite thing still doesn't work for me. Here is the rewrite.log:
Code:
127.0.0.1 127.0.0.1 PEAKLAB\AlexandraS Fri, 19-Sep-2008 09:52:13 GMT [localhost/sid#1][rid#7936300/initial] (2) init rewrite engine with requested uri /news/current_item.asp?clicked_link_id=10 127.0.0.1 127.0.0.1 PEAKLAB\AlexandraS Fri, 19-Sep-2008 09:52:13 GMT [localhost/sid#1][rid#7936300/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 127.0.0.1 127.0.0.1 PEAKLAB\AlexandraS Fri, 19-Sep-2008 09:52:13 GMT [localhost/sid#1][rid#7936300/initial] (3) applying pattern '^news\/(\d*)' to uri '/news/current_item.asp' 127.0.0.1 127.0.0.1 PEAKLAB\AlexandraS Fri, 19-Sep-2008 09:52:14 GMT [localhost/sid#1][rid#7936300/initial] (2) init rewrite engine with requested uri /styles/included_file_left.css 127.0.0.1 127.0.0.1 PEAKLAB\AlexandraS Fri, 19-Sep-2008 09:52:14 GMT [localhost/sid#1][rid#7936300/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 127.0.0.1 127.0.0.1 PEAKLAB\AlexandraS Fri, 19-Sep-2008 09:52:14 GMT [localhost/sid#1][rid#7936300/initial] (3) applying pattern '^news\/(\d*)' to uri '/styles/included_file_left.css' 127.0.0.1 127.0.0.1 PEAKLAB\AlexandraS Fri, 19-Sep-2008 09:52:14 GMT [localhost/sid#1][rid#7936300/initial] (2) init rewrite engine with requested uri /images/news/logo_google.gif 127.0.0.1 127.0.0.1 PEAKLAB\AlexandraS Fri, 19-Sep-2008 09:52:14 GMT [localhost/sid#1][rid#7936300/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf 127.0.0.1 127.0.0.1 PEAKLAB\AlexandraS Fri, 19-Sep-2008 09:52:14 GMT [localhost/sid#1][rid#7936300/initial] (3) applying pattern '^news\/(\d*)' to uri '/images/news/logo_google.gif' |
|
|
Any idea about what is wrong?
|
| Back to Top |
|
| |
domus71 Newbie

Joined: 14 July 2008 Location: Greece
Online Status: Offline Posts: 4
|
| Posted: 22 September 2008 at 1:21pm | IP Logged
|
|
|
Hi again,
You mean that if you write http://localhost/news/10 you don't get the correct page? (http://localhost/news/current_item.asp?clicked_link_id=10)
Costis
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 4701
|
| Posted: 23 September 2008 at 2:52am | IP Logged
|
|
|
So, do you want http://localhost/news/current_item.asp?clicked_link_id=10 to be redirected to http://localhost/news/10, or
do you want the link on page to be http://localhost/news/10 and the user to be actually directed to http://localhost/news/current_item.asp?clicked_link_id=1
__________________ Regards,
Anton
|
| Back to Top |
|
| |
Alien Newbie

Joined: 18 September 2008
Online Status: Offline Posts: 3
|
| Posted: 23 September 2008 at 4:24am | IP Logged
|
|
|
Guys,
first of all thanks for your time so far!
Costis:
Yes, if I write http://localhost/news/10 I get "the page cannot be found" instead http://localhost/news/current_item.asp?clicked_link_id=10
If I write http://localhost/news/current_item.asp?clicked_link_id=10 then I do get my news item, but the url in the address bar doesn't change into SEF.
Anton:
I have this page:
http://localhost/news/current_item.asp?clicked_link_id=10
What I need is a SEF in the address bar, for example http://localhost/news/10 would do.
I thought this URL replacement is done by ISAPI_Rewrite so once I've installed and cofigured it I do not need to do anything else, or am I wrong?
|
| Back to Top |
|
| |
domus71 Newbie

Joined: 14 July 2008 Location: Greece
Online Status: Offline Posts: 4
|
| Posted: 23 September 2008 at 3:22pm | IP Logged
|
|
|
You must see something like that in your debug.log file when you type http://localhost/news/10
Code:
applying pattern '^news\/(\d*)' to uri 'news/10' escaping /news/current_item.asp?clicked_link_id=10 Rewrite URL to >> /news/current_item.asp?clicked_link_id=10 rewrite 'news/10' -> '/news/current_item.asp?clicked_link_id=10'
|
|
|
Clear your debug.log file, try it and send here the debug lines to see what's wrong.
Costis Papadakis www.airpics.gr www.airpics.net
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 4701
|
| Posted: 25 September 2008 at 9:17am | IP Logged
|
|
|
Probably you slightly misunderstand the concept of ISAPI_Rewrite: you DO need to change links on your pages to SEF format like
http://localhost/news/10. And after that provided rules should work for you.
__________________ Regards,
Anton
|
| Back to Top |
|
| |