Forum Moderators: phranque
He is using mod_access to block unwanted traffic and some of my mod_rewrite directives. Does the use of a mod_rewrite directive in a .htaccess affect the directives set in httpd.conf, or is he mistyping something in httpd.conf?
He has provided me with this additional information:
I use a .htaccess in my public_html folder for easy FTP changes, but I
have it set as an Include in httpd.conf. I set "AllowOverride None"
for better performance.< snip >
I'm having some trouble with one of your directives:
RewriteBase /
I Include .htaccess file in httpd.conf. Apache won't restart, so then
I run "apachectl configtest" I get this error:Syntax error on line 162 of /home/EXAMPLE/public_html/.htaccess:
RewriteBase: only valid in per-directory config filesLine 162 corresponds to the "Rewritebase /" directive. When I comment
it out I can restart Apache OK. Any idea what's the matter with this?
I'd recommend that you/he contact the hosting company.
Jim
Interestingly, and possibly related, I wrote some consolidated RedirectMatch rules for him and some of these rules used the Regular Expression term: \d and \d{1,2} - to redirect old pages to new ones. many of these rules use back references and some had double back references. I tested all of the codes on my own server and they worked as designed. However, on his server, all of the redirects using the \d failed until I changed them to [0-9]. His server is running Apache 1.3, while mine is at 2.26. I tested on my server and the \d worked fine. Is this a known issue with Apache 1.3 (problems with RegExpr and back references)?
[edited by: Wizcrafts at 10:33 pm (utc) on Feb. 6, 2008]
Jim