This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions (Forum Locked Forum Locked)
 Helicon Tech : Common Questions
Subject Topic: Removing space or %20 send to 404
Author
Message |
bwnbwn
Newbie


Joined: 18 October 2006
Posts: 10
Posted: 22 November 2010 at 10:32am

I have discovered that our server is not handling this correctly. Example

http // www example.com/articles/companyname.htm

http // www example.com/articles/companyname%20.htm

I killed the links on purpose the space issue only comes at the end of the url.

Both of these urls are showing and both show a 200 header. I need to create a rule so a space at the end of the URL or in the url will redirect to our custom 404 page as a 301

I asked our IT department to look into this and they are trying to do in from the code behind. We did a test and it went really bad the page showed a 404 but the url also showed the db log info in the url.

I have searched for several days without finding the correct answer and really don't have enough experience to write this line of code in the rule.

Thanks for any assistance in this manner.

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 23 November 2010 at 2:25am

Please try to use the following config (for ISAPI_Rewrite 3):

RewriteBase /
RewriteRule ^(.*(?:\s|%20).*)$ custom404.asp [NC,R=301,L]

__________________
Regards,
Anton
Back to Top
 
bwnbwn
Newbie


Joined: 18 October 2006
Posts: 10
Posted: 23 November 2010 at 8:18am

Anton wrote:
Please try to use the following config (for ISAPI_Rewrite 3):

RewriteBase /
RewriteRule ^(.*(?:\s|%20).*)$ custom404.asp [NC,R=301,L]

 

Thanks very much Anton for your assistance in the matter. It seems to work for this example.com/folder/page.%20htm and sends the page to the 404 but allows this to go through
example.com/folder/page%20.htm I tried playing with the rule but it is really over my head.

If posssible I need both of these to go to the 404 page.

example.com/folder/page%20.htm
example.com/folder/page.%20htm

Thanks very much

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 24 November 2010 at 4:42am

That's really strange...
Could you please enable logging in httpd.conf and provide rewrite.log records for the working and non-working
requests.

__________________
Regards,
Anton
Back to Top
 
bwnbwn
Newbie


Joined: 18 October 2006
Posts: 10
Posted: 24 January 2011 at 12:54pm

Anton thanks for the reply I purchased a support ticket as I needed a complex rewrite rule configured. I had this fixed as well with the support purchase. Thanks for your assistance.
Back to Top
 

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

Printable version Printable version
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 cannot vote in polls in this forum