Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change 
notification.

The following page has been changed by VinkoVrsalovic:
http://wiki.apache.org/httpd/htaccessGotchas

The comment on the change is:
First attempt, correct please!

New page:
There are a couple of things you must write differently when using .htaccess 
instead of main configuration files. Here's a listing of (currently) only one 
:-)

=== RewriteRules ===
The part given as argument to a RewriteRule is stripped from the trailing /, 
so, if you have a rule like
{{{
RewriteRule ^/images/foo.png$ /images/oldfoo.png
}}}
working in your main config file and suddenly it stops working when you moved 
to a shared hosting and placed it in a .htaccess, try stripping the first /, 
thus becoming
{{{
RewriteRule ^images/foo.png$ /images/oldfoo.png
}}}
This happens because .htaccess work in a Directory context (thus the same would 
have to be done if the rule was in a <Directory> section)

(Add the RewriteBase considerations!)

Reply via email to