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: Dash not working in URL
Author
Message |
kohnhost
Newbie


Joined: 09 September 2010
Posts: 5
Posted: 09 September 2010 at 3:58pm

I have a software package that uses Isapi to rewrite friendly URLs. I created a category named Mul-T-Lock but when I click the link, I get a 'The system cannot find the file specified.' error. The ISASP rule in IIS is below. What do I need to change?

Options -MultiViews +FollowSymlinks -Indexes

# Force 401 pages to use a valid error document
# so they do not fall back to the 404 which is
# triggered by ISC. This allows HTTP Auth to work
# correctly
ErrorDocument 401 "Unauthorized access"

<IfModule mod_security.c>
    # Turn off mod_security filtering.
    SecFilterEngine Off

    # The below probably isn't needed, but better safe than sorry.
    SecFilterScanPOST Off
</IfModule>

<IfModule mod_rewrite.c>
    RewriteEngine On
    # If your server is running PHP in CGI mode you will probably need to uncomment the following lines
    # Only uncomment lines that begine with Rewrite

    # The RewriteBase should be set to the same value as the AppPath setting in your config.php WITH a / on the end
    # RewriteBase /

    # This rewrite base rule is only required if you are getting 401 unauthorized errors when placing an order with Google Checkout
    # RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
    #
    # Alternatively, if the above does not work, try uncommenting this line below instead:
    # SetEnvIfNoCase Authorization "Basic ([a-z0-9=]+)" REMOTE_AUTHORIZATION=$1

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php
    <IfModule mod_env.c>
        SetEnv SEO_SUPPORT 1
    </IfModule>
</IfModule>

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE application/x-javascript text/css text/html text/xml
</IfModule>
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 10 September 2010 at 7:51am

Hello,

Does this issue occur only in URLs with dashes? If so, please, provide the rewrite.log for the testing request.

If not, there's a possibility that you need the same hack as in the following article:
http://www.helicontech.com/cms_articles/joomla.htm

Regards
Andrew
Back to Top
 
kohnhost
Newbie


Joined: 09 September 2010
Posts: 5
Posted: 13 September 2010 at 9:44am

Yes, it only occurs in URLs with dashes, and there is nothing in the rewrite.log.
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 14 September 2010 at 4:46am

It's because the logs are not enabled.
Please see the logging issues described in FAQ and
provide the one with the testing request.

Regards
Andrew
Back to Top
 
kohnhost
Newbie


Joined: 09 September 2010
Posts: 5
Posted: 14 September 2010 at 7:48am

I added

#enabling rewrite.log
RewriteLogLevel 9
#enabling error.log
LogLevel debug

to the httpd.conf file, but the rewrite.log is still empty after visiting the URL in question and getting the error.
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 14 September 2010 at 8:33am

Odd. Shouldn't be happening. Is it AFTER the "RewriteEngine on"?
Please, consider possibility of an online meeting or RDP session to take a closer look and fix the issues.

Regards
Andrew
Back to Top
 
kohnhost
Newbie


Joined: 09 September 2010
Posts: 5
Posted: 14 September 2010 at 8:40am

I don't see that. This is my entire httpd.conf file

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.45


# Registration info
RegistrationName= 'hidden'
RegistrationCode= 'hidden'

#enabling rewrite.log
RewriteLogLevel 9
#enabling error.log
LogLevel debug
Back to Top
 
developers
Newbie


Joined: 31 August 2011
Posts: 1
Posted: 31 August 2011 at 2:05pm

Was this ever resolved?
I'm running into the same issue - 'user friendly' URLs from our shopping cart that have dashes in them end up generating 404 errors.

I have logging enabled and never see anything in the logs related to the URL in question.

Because the shopping cart translates spaces to dashes, the dashes end up being double encoded and a product named 'This - That' ends up with a URL like:

http://www.mydomain.com/products/This-%252d-that.html

The rewrite rules that exist should basically send everything to index.php, but urls with the encoded dash always give 404.

.htaccess looks like this:
    RewriteEngine On  
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php

What do i need to do to let these URLs be mapped?

Back to Top
 
kohnhost
Newbie


Joined: 09 September 2010
Posts: 5
Posted: 31 August 2011 at 3:08pm

No, I never got this resolved
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 01 September 2011 at 2:05am

Please, see NE and NU flags in RewriteRule directive documentation.
Also, make sure you have the latest build of ISAPI_Rewrite, as the encoding problems always show up and are being fixed once in a while.

As I said, to investigate the issue we need rewrite.log.
Provide the logs and we'll see the mechanism of the request processing.

Regards
Andrew
Back to Top
 

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

Printable version Printable version