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: why this rule is not working?
Author
Message |
Gooloosh
Newbie


Joined: 08 June 2009
Location: Israel
Posts: 15
Posted: 02 February 2012 at 1:33am

I want to add new rule to my .htaccess file.

the rule I added is:

Code:
#RewriteRule ^/(\d{3})-05-.*/sml/?$
/tips/moreLinks.asp?s=$1 [L,O]


the friendly url look like:

/040-05-MYSearchWord/sml/

but I'm getting 404 error

I have previous rule that I need to make my rule
differnet from it

Code:
RewriteRule ^/.*-([0-9]+)/?$ /IE/IEtopic.asp?S=$1
[L,NE]


that why I add the folder /sml/ and placed the new rule
abbove the old rule, but I just get the 404 error

what should I do?

thanks!
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 02 February 2012 at 4:57am

The new rule you've written looks quite ok, so the easiest way to detect the problem is to enable logging in httpd.conf by putting

RewriteLogLevel 9

then make the corresponding request and provide rewrite.log records for it.

__________________
Regards,
Anton
Back to Top
 
Gooloosh
Newbie


Joined: 08 June 2009
Location: Israel
Posts: 15
Posted: 02 February 2012 at 6:51am

Do I need To add the rewrite.log to my server,
Or it build aotumatically?

I added the RewriteLogLevel 9 to my .htaccess file
but can't find any rewrite.log file in my server
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 06 February 2012 at 2:57am

IF the rewrite.log file doesn't appear automatically, please try to create it manually (in ISAPI_Rewrite 3 installation folder).
Also please make sure there are sufficient permissions to modify the file.

__________________
Regards,
Anton
Back to Top
 
Gooloosh
Newbie


Joined: 08 June 2009
Location: Israel
Posts: 15
Posted: 06 February 2012 at 4:43am

I tried to add the file, but nothing is written in it.

What else can I do? Frustrating that I can not upload the
project only because the friendly URL not working
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 07 February 2012 at 1:58am

Have you tested if any other rules work either in .htaccess or in httpd.conf.
Please try to put this testing rule into .htaccess and then into httpd.conf (don't forget to remove it from .htaccess):

RewriteRule testtest http\://www.google.com [NC,R=301,L]

Make request to yoursite.com/testtest and report us the results for both cases.

__________________
Regards,
Anton
Back to Top
 
Gooloosh
Newbie


Joined: 08 June 2009
Location: Israel
Posts: 15
Posted: 07 February 2012 at 2:18am

I just can not believe!
What a stupid mistake!

How I have not noticed it?
The rule began with the mark of note(#), then certainly
he did not see it :)

Thank you anyway for trying.
And the truth that what opened my eyes to see it was the
rule you have send me to add. suddenly I noticed that I
have the comment sign in my rule

thanks again,
and Have a good day
Back to Top
 

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

Printable version Printable version