Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: redirect help - newbe Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
bglavan
Newbie
Newbie


Joined: 21 August 2008
Online Status: Offline
Posts: 6
Posted: 21 August 2008 at 9:12am | IP Logged Quote bglavan

Hi

We are having our sites URL http://domain.com/kat.asp?c=2&name=Auto

and i need to Rewrite it as
http://domain.com/Auto/2.htm
or
http://domain.com/Auto/2/auto.htm

We are using the rule

RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} ^c=(.+)&name=(.+)$ [NC]
RewriteRule ^kat\.asp$ /%2/%1/%2.htm [NC,R=301,L]

But it is not working.
Indicates to me a error: "

HTTP/1.1 404 Not Found"

and does not show anything on the site.

Thanks in advance.

Bruno
Back to Top View bglavan's Profile Search for other posts by bglavan
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 673
Posted: 21 August 2008 at 9:30am | IP Logged Quote Vyacheslav

Hi Bruno.
Please write these lines in your httpd.conf:
Code:
RewriteLogLevel 9
LogLevel debug


Make non-working request and please send to us your rewrite.log and error.log.

__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
bglavan
Newbie
Newbie


Joined: 21 August 2008
Online Status: Offline
Posts: 6
Posted: 21 August 2008 at 10:03am | IP Logged Quote bglavan

Hi,
log file located in the installation directory, but I no access there, because I'm on the shared hosting. Is there another way to print the log file in the local folder?

I try to whether it works with for example Redirecting non-www version to www, and to all working properly.

In this example, I used the querystring directly from mySQL databases, and such has more strings, if you can to help.

Please help.
Bruno
Back to Top View bglavan's Profile Search for other posts by bglavan
 
bglavan
Newbie
Newbie


Joined: 21 August 2008
Online Status: Offline
Posts: 6
Posted: 21 August 2008 at 12:37pm | IP Logged Quote bglavan

127.0.0.1 127.0.0.1  Thu, 21-Aug-2008  19:11:37 GMT [localhost/sid#1][rid#8184364/initial] (2) init rewrite engine with requested uri /kas/kat.asp?c=2&kat=Auto-Moto
127.0.0.1 127.0.0.1  Thu, 21-Aug-2008  19:11:37 GMT [localhost/sid#1][rid#8184364/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
127.0.0.1 127.0.0.1  Thu, 21-Aug-2008  19:11:37 GMT [localhost/sid#1][rid#8184364/initial] (1) Htaccess process request c:\inetpub\wwwroot\kas\.htaccess
127.0.0.1 127.0.0.1  Thu, 21-Aug-2008  19:11:37 GMT [localhost/sid#1][rid#8184364/initial] (3) applying pattern '^kat\.asp$' to uri 'kas/kat.asp'
127.0.0.1 127.0.0.1  Thu, 21-Aug-2008  19:11:37 GMT [localhost/sid#1][rid#8184364/initial] (2) init rewrite engine with requested uri /kas/images/utils.js
127.0.0.1 127.0.0.1  Thu, 21-Aug-2008  19:11:37 GMT [localhost/sid#1][rid#8184364/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
127.0.0.1 127.0.0.1  Thu, 21-Aug-2008  19:11:37 GMT [localhost/sid#1][rid#8184364/initial] (1) Htaccess process request c:\inetpub\wwwroot\kas\.htaccess
127.0.0.1 127.0.0.1  Thu, 21-Aug-2008  19:11:37 GMT [localhost/sid#1][rid#8184364/initial] (3) applying pattern '^kat\.asp$' to uri 'kas/images/utils.js'

Back to Top View bglavan's Profile Search for other posts by bglavan
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4701
Posted: 22 August 2008 at 3:55am | IP Logged Quote Anton

Please try the following config:

RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} ^c=(.+)&name=(.+)$ [NC]
RewriteRule ^kas/kat\.asp$ /%2/%1/%2.htm? [NC,R=301,L]

If it doesn't work, please provide specific example of initial and rewritten url you want to achieve.


__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
bglavan
Newbie
Newbie


Joined: 21 August 2008
Online Status: Offline
Posts: 6
Posted: 22 August 2008 at 4:07am | IP Logged Quote bglavan

Hi,
now I get this message
"The system cannot find the path specified."

and not showing any data but in the address bar is all spelled correctly

regards Bruno

Back to Top View bglavan's Profile Search for other posts by bglavan
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4701
Posted: 26 August 2008 at 3:32am | IP Logged Quote Anton

Please provide your testing url and rewrite log records for it.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
bglavan
Newbie
Newbie


Joined: 21 August 2008
Online Status: Offline
Posts: 6
Posted: 27 August 2008 at 7:36am | IP Logged Quote bglavan

I finally got log files, only a few modificiran from the previous examples, but not work. After that occurs to me that the page can be found.

78.2.106.50 78.2.106.50  Wed, 27-Aug-2008  08:58:19 GMT [kastav.info/sid#787][rid#20586728/initial] (2) init rewrite engine with requested uri /kategorije0.asp
78.2.106.50 78.2.106.50  Wed, 27-Aug-2008  08:58:19 GMT [kastav.info/sid#787][rid#20586728/initial] (1) Htaccess process request C:\Inetpub\ISAPI\httpd.conf
78.2.106.50 78.2.106.50  Wed, 27-Aug-2008  08:58:19 GMT [kastav.info/sid#787][rid#20586728/initial] (1) Htaccess process request d:\hshome\kastav2\kastav.info\.htaccess
78.2.106.50 78.2.106.50  Wed, 27-Aug-2008  08:58:19 GMT [kastav.info/sid#787][rid#20586728/initial] (3) applying pattern '^kategorije0\.asp$' to uri 'kategorije0.asp'
78.2.106.50 78.2.106.50  Wed, 27-Aug-2008  08:58:19 GMT [kastav.info/sid#787][rid#20586728/initial] (4) RewriteCond: input='c=2&kategorija=Auto-Moto' pattern='^c=(.+)&kategorija=(.+)$' => matched
78.2.106.50 78.2.106.50  Wed, 27-Aug-2008  08:58:19 GMT [kastav.info/sid#787][rid#20586728/initial] (1) escaping /Auto-Moto/2/Auto-Moto.htm
78.2.106.50 78.2.106.50  Wed, 27-Aug-2008  08:58:19 GMT [kastav.info/sid#787][rid#20586728/initial] (2) explicitly forcing redirect with http://kastav.info/Auto-Moto/2/Auto-Moto.htm
78.2.106.50 78.2.106.50  Wed, 27-Aug-2008  08:58:19 GMT [kastav.info/sid#787][rid#20586728/initial] (1) Redirect to url http://kastav.info/Auto-Moto/2/Auto-Moto.htm
78.2.106.50 78.2.106.50  Wed, 27-Aug-2008  08:58:19 GMT [kastav.info/sid#787][rid#20586728/initial] (2) internal redirect with /kategorije0.asp?c=2&kategorija=Auto-Moto [INTERNAL REDIRECT]
78.2.106.50 78.2.106.50  Wed, 27-Aug-2008  08:58:19 GMT [kastav.info/sid#787][rid#20586728/initial] (2) init rewrite engine with requested uri /Auto-Moto/2/Auto-Moto.htm
78.2.106.50 78.2.106.50  Wed, 27-Aug-2008  08:58:19 GMT [kastav.info/sid#787][rid#20586728/initial] (1) Htaccess process request C:\Inetpub\ISAPI\httpd.conf
78.2.106.50 78.2.106.50  Wed, 27-Aug-2008  08:58:19 GMT [kastav.info/sid#787][rid#20586728/initial] (1) Htaccess process request d:\hshome\kastav2\kastav.info\.htaccess
78.2.106.50 78.2.106.50  Wed, 27-Aug-2008  08:58:19 GMT [kastav.info/sid#787][rid#20586728/initial] (3) applying pattern '^kategorije0\.asp$' to uri 'Auto-Moto/2/Auto-Moto.htm'
Back to Top View bglavan's Profile Search for other posts by bglavan
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 673
Posted: 27 August 2008 at 8:02am | IP Logged Quote Vyacheslav

Hi.
Please try these rules:
Code:
RewriteBase /
RewriteCond %{QUERY_STRING} ^c=(\d+)&name=([^/]+)$ [NC]
RewriteRule ^kategorije0\.asp$ /%2/%1/%2.htm? [NC,R=301]
RewriteRule ^([^/]+)/(\d+)/([^/]+)/?$ kategorije0.asp?c=$2&name=$1 [NC,L]


__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
bglavan
Newbie
Newbie


Joined: 21 August 2008
Online Status: Offline
Posts: 6
Posted: 27 August 2008 at 8:24am | IP Logged Quote bglavan

thank you very much, I finally solve problem.
Back to Top View bglavan's Profile Search for other posts by bglavan
 

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 can vote in polls in this forum