| Author |
|
bglavan Newbie

Joined: 21 August 2008
Online Status: Offline Posts: 6
|
| Posted: 21 August 2008 at 9:12am | IP Logged
|
|
|
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 |
|
| |
Vyacheslav Moderator Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 673
|
| Posted: 21 August 2008 at 9:30am | IP Logged
|
|
|
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 |
|
| |
bglavan Newbie

Joined: 21 August 2008
Online Status: Offline Posts: 6
|
| Posted: 21 August 2008 at 10:03am | IP Logged
|
|
|
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 |
|
| |
bglavan Newbie

Joined: 21 August 2008
Online Status: Offline Posts: 6
|
| Posted: 21 August 2008 at 12:37pm | IP Logged
|
|
|
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 |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 4701
|
| Posted: 22 August 2008 at 3:55am | IP Logged
|
|
|
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 |
|
| |
bglavan Newbie

Joined: 21 August 2008
Online Status: Offline Posts: 6
|
| Posted: 22 August 2008 at 4:07am | IP Logged
|
|
|
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 |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 4701
|
| Posted: 26 August 2008 at 3:32am | IP Logged
|
|
|
Please provide your testing url and rewrite log records for it.
__________________ Regards,
Anton
|
| Back to Top |
|
| |
bglavan Newbie

Joined: 21 August 2008
Online Status: Offline Posts: 6
|
| Posted: 27 August 2008 at 7:36am | IP Logged
|
|
|
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 |
|
| |
Vyacheslav Moderator Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 673
|
| Posted: 27 August 2008 at 8:02am | IP Logged
|
|
|
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 |
|
| |
bglavan Newbie

Joined: 21 August 2008
Online Status: Offline Posts: 6
|
| Posted: 27 August 2008 at 8:24am | IP Logged
|
|
|
thank you very much, I finally solve problem.
|
| Back to Top |
|
| |