This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions
 Helicon Tech : Common Questions
Subject Topic: Removing space or %20 send to 404 Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
bwnbwn
Newbie
Newbie


Joined: 18 October 2006
Online Status: Offline
Posts: 10
Posted: 22 November 2010 at 10:32am | IP Logged Quote bwnbwn

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 View bwnbwn's Profile Search for other posts by bwnbwn
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 23 November 2010 at 2:25am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 
bwnbwn
Newbie
Newbie


Joined: 18 October 2006
Online Status: Offline
Posts: 10
Posted: 23 November 2010 at 8:18am | IP Logged Quote bwnbwn

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 View bwnbwn's Profile Search for other posts by bwnbwn
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10520
Posted: 24 November 2010 at 4:42am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 
bwnbwn
Newbie
Newbie


Joined: 18 October 2006
Online Status: Offline
Posts: 10
Posted: 24 January 2011 at 12:54pm | IP Logged Quote bwnbwn

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 View bwnbwn's Profile Search for other posts by bwnbwn
 

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