Link to home
Start Free TrialLog in
Avatar of sharingsunshine
sharingsunshineFlag for United States of America

asked on

Regex Space in Inbound Link Url

I have an inbound link that is using an incorrect url that has %20 in the url several times.  Here is the url I need to redirect

http://www.abc.com/Myrrh%20-%20100%%20Pure%20Essential%20Oil_p_440.htm

This is what I thought to use but it isn't working.

RedirectMatch 301 ^/Myrrh\s-\s100%\sPure\sEssential\sOil_p_440.htm$ /product.php?productid=440

Please advise,

Randal
Avatar of arnold
arnold
Flag of United States of America image

%20 is pace enonded using URL.

URL's can not have spaces since a URL has to be a single contiguous set of information.

Space is not a good choice for filenames, or anything that is web accessible.
Avatar of sharingsunshine

ASKER

this is an inbound link so I have no control over the url.  That is why I need a regex so I can redirect it to a real url.
\s* is a regex for any space
\s+ is a regex for one space or more.


%20
RedirectMatch 301 ^/Myrrh(\s*|%20)-(\s*|%20)100%(\s*|%20)Pure(\s*|%20)Essential(\s*|%20)Oil_p_440.htm$ /product.php?productid=440

Is the productID the last item on the list?

RedirectMatch 301 ^/Myrrh.*\_p_([0-9]+).html$ /product.php?productid=$1
Neither one worked.  I even corrected the .html and made it .htm on the second one but that still didn't work.
Which apache version do you have?

The extra \ in front of the \_ might have been an issue.

RedirectMatch 301 ^/Myrrh.*_p_([0-9]+)\.htm$ /product.php?productid=$1

You need to load apache after adding the entry.
the redirect as outlined above works for me O ad the .html at the end but should work with .htm:
Here are the relevant apache log entries (note the request almost "instantaneous."
XXX.XXX.XXX.XXX - - [22/Dec/2011:16:31:10 -0500] "GET /Myrrhdsfdsfsdfs_p_4420.html HTTP/1.1" 301 339 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
XXX.XXX.XXX.XXX - - [22/Dec/2011:16:31:10 -0500] "GET /product.php?productid=4420 HTTP/1.1" 404 313 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"
reload rather than load apache.
RedirectMatch 301 ^/Myrrh(\s*|%20)-(\s*|%20)100%(\s*|%20)Pure(\s*|%20)Essential(\s*|%20)Oil_p_440.htm$ /product.php?productid=440
I would put the quantifier outside of the parens on arnold's pattern:

RedirectMatch 301 Myrrh(?:\s|%20|-)*100%(?:\s|%20)*Pure(?:\s|%20)*Essential(?:\s|%20)*Oil_p_440.html$ /product.php?productid=440

Open in new window

neither option work

not sure which you need

Server version: Apache/2.2.17 (Unix)

Cpanel::Easy::Apache v3.2.6 rev9999
Is mod_alias enabled on your system?
Apache 2.2
The redirect should work as the logs from my apache indicate that it matches and redirects.  can you look through your logs for the request and post what is being reported?

Run httpd -M 2>&1 | grep -i alias_module (through a command line to see what modules are loaded).
alias_module is the one that has the functions for RedirectMatch
here is what is showing using that command

authn_alias_module (static)
 alias_module (static)
ok.

try this create a fake entry
RedirectMatch 301 ^/This_entry_does_not_exists.*([0-9]+)\.htm$ /some_products.php?productid=$1

reload httpd.

using a browser go to http://yourdomain/This_entry_does_not_exists%20_dsfds-fdsew%526.htm
Then check the log and post the log entry.

When I tried using IE to input a URL with spaces, IE rejects it as invalid.

At this stage I'd like to make sure that the requests are actually making their way to the apache server and that you are looking in the right place, versus having the requests not sent by the browser and you checking the apache logs for entries of requests that were never sent/made.
Took me a while because the normal logs don't track rewrites. So here is what the log showed for your fictitious url.  Keep in mind I have changed the IP, path to the file and the domain name

0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '(.*)' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.+)_amp_(.+)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^onsale.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^newproducts.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern 'images,$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)_page_([0-9]*)_c_([0-9]*),$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.+)p([0-9]+)\.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^robots\.txt$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.+\.)(html?|htlm)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (4) [perdir /var/www/html/] RewriteCond: input='/This_entry_does_not_exists _dsfds-fdsewR6.html' pattern='!\.html$' => not-matched
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^gallery(2(\.3)?)?/' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/(.*)newsletter-(.*)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/(petnews.html)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/rest-and-trust-(.*).html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/are-we-like-play-dough-(.*).html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/what-is-your-reflection-(.*).html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2001/atn(.*)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2002/atn(.*)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2003/atn(.*)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2004/atn(.*)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2005/atn(.*)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^ATN/([0-9]{2})([0-9]{2})([0-9]{2})\.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^atn/([0-9]{2})([0-9]{2})([0-9]{2})\.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^atn/atn20([0-9]{2})/([0-9]{2})([0-9]{2})([0-9]{2})\.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^ATN/atn20([0-9]{2})/([0-9]{2})([0-9]{2})([0-9]{2})\.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^ATN([0-9]{4})$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^ATN/(ATN|album.asp)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '.+$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^.*' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^/(.*).html(.*)' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern 'AHMblog/\$1/\$2/\$3(.+)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern 'AHMblog/archives/(.+)_ahmarchive\.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (3) [perdir /var/www/html/] applying pattern '^(.+)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (4) [perdir /var/www/html/] RewriteCond: input='/This_entry_does_not_exists _dsfds-fdsewR6.html' pattern='!^/(payment|admin|provider|partner)/' => matched
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (4) [perdir /var/www/html/] RewriteCond: input='/var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html' pattern='!\.(gif|jpe?g|png|js|css|swf|php|ico)$' => matched
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (4) [perdir /var/www/html/] RewriteCond: input='/var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html' pattern='!-f' => matched
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (4) [perdir /var/www/html/] RewriteCond: input='/var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html' pattern='!-d' => matched
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (4) [perdir /var/www/html/] RewriteCond: input='/var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html' pattern='!-l' => matched
0.0.0.0 - - [23/Dec/2011:14:10:39 --0600] [www.abc.com/sid#b0dfd28][rid#e9ae6e0/initial] (2) [perdir /var/www/html/] rewrite 'This_entry_does_not_exists _dsfds-fdsewR6.html' -> 'cdseopro.php'

Open in new window

You may have a conditional redirect that acts before it gets to the RedirectMatch rule.
Do you have access to the raw apache log?

Not sure what the stripdir is doing in this log or what this log entry is

Try the one with the first slash removed.

RedirectMatch 301 ^This_entry_does_not_exists.*([0-9]+)\.htm$ /some_products.php?productid=$1
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '(.*)' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.+)_amp_(.+)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^onsale.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^newproducts.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern 'images,$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)_page_([0-9]*)_c_([0-9]*),$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.+)p([0-9]+)\.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^robots\.txt$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.+\.)(html?|htlm)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (4) [perdir /var/www/html/] RewriteCond: input='/This_entry_does_not_exists _dsfds-fdsewR6.html' pattern='!\.html$' => not-matched
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^gallery(2(\.3)?)?/' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/(.*)newsletter-(.*)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/(petnews.html)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/rest-and-trust-(.*).html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/are-we-like-play-dough-(.*).html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/what-is-your-reflection-(.*).html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2001/atn(.*)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2002/atn(.*)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2003/atn(.*)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2004/atn(.*)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2005/atn(.*)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^ATN/([0-9]{2})([0-9]{2})([0-9]{2})\.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^atn/([0-9]{2})([0-9]{2})([0-9]{2})\.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^atn/atn20([0-9]{2})/([0-9]{2})([0-9]{2})([0-9]{2})\.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^ATN/atn20([0-9]{2})/([0-9]{2})([0-9]{2})([0-9]{2})\.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^ATN([0-9]{4})$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^ATN/(ATN|album.asp)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '.+$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^.*' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^/(.*).html(.*)' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern 'AHMblog/\$1/\$2/\$3(.+)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern 'AHMblog/archives/(.+)_ahmarchive\.html$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html -> This_entry_does_not_exists _dsfds-fdsewR6.html
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (3) [perdir /var/www/html/] applying pattern '^(.+)$' to uri 'This_entry_does_not_exists _dsfds-fdsewR6.html'
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (4) [perdir /var/www/html/] RewriteCond: input='/This_entry_does_not_exists _dsfds-fdsewR6.html' pattern='!^/(payment|admin|provider|partner)/' => matched
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (4) [perdir /var/www/html/] RewriteCond: input='/var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html' pattern='!\.(gif|jpe?g|png|js|css|swf|php|ico)$' => matched
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (4) [perdir /var/www/html/] RewriteCond: input='/var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html' pattern='!-f' => matched
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (4) [perdir /var/www/html/] RewriteCond: input='/var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html' pattern='!-d' => matched
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (4) [perdir /var/www/html/] RewriteCond: input='/var/www/html/This_entry_does_not_exists _dsfds-fdsewR6.html' pattern='!-l' => matched
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (2) [perdir /var/www/html/] rewrite 'This_entry_does_not_exists _dsfds-fdsewR6.html' -> 'cdseopro.php'
root@the [/home/theherbs]# 

Open in new window



I am on cpanel and I have access to those logs will that help?

look in /var/log/httpd or /var/log/apache/ for access_log
I like to see the raw log versus whatever the source of this log is?
Alternatively, could you check and tell me what the configuration of your logger is in the configuration file?

The last entry in the snippet you posted indicates that there was a match and a rewrite
0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (2) [perdir /var/www/html/] rewrite 'This_entry_does_not_exists _dsfds-fdsewR6.html' -> 'cdseopro.php'

What is the rule that you have?

Where are you adding the modifications that have been suggested?

Are you editing the raw /etc/httpd/conf/httpd.conf file or are you making the changes using the cpanel interface?

We have the access log through cpanel but it isn't showing any activity from rewrites though.  I searched for This and it isn't in the log.

I don't know how to check the configuration of the logger file.

The rule I have is the last one you gave me
RedirectMatch 301 ^This_entry_does_not_exists.*([0-9]+)\.htm$ /some_products.php?productid=$1

I am adding the modifications in the .htaccess file at the root level

I am just making the modifications on a dreamweaver .htaccess page and uploading it.

Based on your log there is a rewrite reference line 71 from http#a37335056

0.0.0.0 - - [24/Dec/2011:16:33:05 --0600] [www.abc.com/sid#a0d7ac0][rid#e760e50/initial] (2) [perdir /var/www/html/] rewrite 'This_entry_does_not_exists _dsfds-fdsewR6.html' -> 'cdseopro.php'


This could be an custom 404 handler. (error no such document)
it is a custom rewrite for my entire site.  However, I placed your code suggestions and kaufmed's above the line of code that defaults to it and it still never matched.

Here is the code and where I placed it.

[I placed your code here]

RewriteCond %{REQUEST_URI} !^/(payment|admin|provider|partner)/
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|png|js|css|swf|php|ico)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ cdseopro.php

Open in new window

Where is this in relation to the <VirtualHost >

is mod_alias or alias_module loaded on the httpd version that you are running.
Can you look at the httpd.conf to see whether alias_mod.so is configured there?
I have all of this in .htaccess and <VirtualHost> is in the httpd.conf file.  I am checking with the admin on our server about the other issue.


Here is what they said

Our apache builds have all the enabled modules built in, and not installed as dynamically-loaded modules, so there is no section in which all the modules are loaded. mod_alias is selected as part of the default build of apache for our cpanel installations, so you should be ok. There are a number of Alias, ScriptAlias, and ScriptAliasMatch directives in the cpanel-specific configuration part of the apache configuration file, and those are processed through mod_alias.
Do you have the option to add the redirectMatch directive directly into the httpd.conf or /etc/httpd/conf.d/your_virtual_host.conf?

http://www.askapache.com/htaccess/301-redirect-with-mod_rewrite-or-redirectmatch.html
Which logformat is used in your log for the virtual host?
Here is a sample.

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
I can do that but where do I put it in the httpd.conf file.  I have always used the .htaccess file for several years now. This is why I don't have any experience how to use the conf file instead.

Where do I find the logformat?

I clicked on the link but it doesn't specify how to put it in the conf file that I can tell.
Do you have a <directory> definition in the .htaccess.

.htaccess is a localized configuration.
try rewriteRule instead



RewriteRule ^This_entry_does_not_exists.*([0-9]+)\.htm$ /some_products.php?productid=$1

Which OS is the system running? Redhat/centos/ubuntu/debian/etc.?
redhat/centos /etc/httpd/conf/httpd.conf

I don't have a <directory> in .htaccess

I am running centos

0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '(.*)' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.+)_amp_(.+)$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^onsale.html$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^newproducts.html$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern 'images,$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)_page_([0-9]*)_c_([0-9]*),$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.+)p([0-9]+)\.html$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^robots\.txt$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.+\.)(html?|htlm)$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^gallery(2(\.3)?)?/' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/(.*)newsletter-(.*)$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/(petnews.html)$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/rest-and-trust-(.*).html$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/are-we-like-play-dough-(.*).html$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/what-is-your-reflection-(.*).html$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2001/atn(.*)$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2002/atn(.*)$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2003/atn(.*)$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2004/atn(.*)$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.*)/ATN2005/atn(.*)$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^ATN/([0-9]{2})([0-9]{2})([0-9]{2})\.html$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^atn/([0-9]{2})([0-9]{2})([0-9]{2})\.html$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^atn/atn20([0-9]{2})/([0-9]{2})([0-9]{2})([0-9]{2})\.html$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^ATN/atn20([0-9]{2})/([0-9]{2})([0-9]{2})([0-9]{2})\.html$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^ATN([0-9]{4})$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^ATN/(ATN|album.asp)$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '.+$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^.*' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^/(.*).html(.*)' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern 'AHMblog/\$1/\$2/\$3(.+)$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern 'AHMblog/archives/(.+)_ahmarchive\.html$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^This_entry_does_not_exists.*([0-9]+)\.htm$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] strip per-dir prefix: /var/www/html/This_entry_does_not_exists -> This_entry_does_not_exists
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (3) [perdir /var/www/html/] applying pattern '^(.+)$' to uri 'This_entry_does_not_exists'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (4) [perdir /var/www/html/] RewriteCond: input='/This_entry_does_not_exists' pattern='!^/(payment|admin|provider|partner)/' => matched
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (4) [perdir /var/www/html/] RewriteCond: input='/var/www/html/This_entry_does_not_exists' pattern='!\.(gif|jpe?g|png|js|css|swf|php|ico)$' => matched
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (4) [perdir /var/www/html/] RewriteCond: input='/var/www/html/This_entry_does_not_exists' pattern='!-f' => matched
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (4) [perdir /var/www/html/] RewriteCond: input='/var/www/html/This_entry_does_not_exists' pattern='!-d' => matched
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (4) [perdir /var/www/html/] RewriteCond: input='/var/www/html/This_entry_does_not_exists' pattern='!-l' => matched
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e8388f0/initial] (2) [perdir /var/www/html/] rewrite 'This_entry_does_not_exists' -> 'cdseopro.php'
0.0.0.0 - - [02/Jan/2012:17:17:20 --0600] [www.abc.com/sid#b14dee0][rid#e6df5c8/initial/redir#1] (3) [perdir /var/www/html/] applying pattern '^This_entry_does_not_exists.*([0-9]+)\.htm$' to uri 'cdseopro.php'

Open in new window

reposting the same "log" does not help me since I  have no idea how or what generates this log.

I need to see the raw apache log which on centos is in /var/log/httpd/access_log
the configuration is in /etc/httpd/conf/httpd.conf

The example I provided should match

within htaccess are the rewrite/rdirectmatch entries listed individually or are they part of a context?
the raw apache access_log is not showing anything about the entry here is the command I used:

grep -i ' This_entry_does_not_exists' access_log | tail -n 2000

this is where I found it [/etc/httpd/logs] I had previously said /var/www/html was the structure so no one trolling would no our file structure.  I wasn't concerned about you.

all of the rewrite rules are listed individually.

Can you place the redirectMatch directive into the httpd.conf within the VirtualHost to which it is applying?

The raw log you are looking at then might be the wrong one.
tail -f the logfile and see if access to the site is reflected there.

Check the configuration httpd.conf and see where the log files are stored.
http://www.cyberciti.biz/faq/apache-logs/
CustomLog, ErrorLog etc.

the web app (apache/httpd) still knows the location and when compromised the location where the root folder is is not the means through which the attacker compromises.  Security exploits of unpatched application is how that is done. And once compromised the attacker can get the info deailing with the root location if that is really important to them.
These are the logs I found looking at the httpd.conf file

ErrorLog "logs/error_log"
RewriteLog "/usr/local/apache/logs/rewrite.log"

 CustomLog logs/access_log common

I tailed each of them and only the rewrite.log has any entries, which I have already posted before.

I need to find out how to place it in the httpd.conf. Do they want me to use vi or cpanel to do it.  I'll report back the results.
Which and where are these entries from?

Depending on where they are, the access log might not be part of the "site" definition to which you are going.

they are all found in /usr/local/apache/logs/

I am logged in as the root, this is where all the logs go and the cpanel divides them up by domain name or equivalent.

I am in the process of getting the directive in the httpd.conf file do you want it above all other directives?
It should be within the <VirtualHost >RedirectMatch  </VirtualHost> of the existing site to which you want it applied.

You should have within the VirtualHost the CustomLog for access_log where the requests you get are logged.  If you do not, double check how the logformat common is defined.
It should be similar to the way I posted in http:#a37357438
Or do you redefine LogFormat for each domain?
I have the entry in the httpd.conf file

I find nothing with the words LogFormat but I do find
CustomLog /usr/local/apache/domlogs/theherbsplace.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."

Is that what you are looking for?

Looking into that log with the tail command nothing shows.

I think you probably are tired of this question so if you are OK with it I will give you the points and close it out and just figure we can't match it.

Yes, if this is the access log for the site where you are trying to setup the redirect.
You could try replacing the "%{%s}t %I .\n%{%s}t %O ." with common on that line and see whether you get a different result.
it is up to you on whether you want to see if it is possible to make this work or close this question.
I don't understand what you mean by the statement -

You could try replacing the "%{%s}t %I .\n%{%s}t %O ." with common on that line and see whether you get a different result.

What is "common?"
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That for your willingness to keep going.