You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by uxwrstre <ux...@trashmail.net> on 2007/04/24 10:49:24 UTC
[users@httpd] RewriteRule ignored in .htaccess file in Apache 2.2.3
Hello,
I have a problem:
I tried to use RewriteRule in a .htaccess file and it does not work. Its totally ignored by mod_rewrite. And its strange because in the configuration file of Apache it works.
And I put in the main configuration file:
<Directory /var/www/*/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
So there is AllowOverride All, and when I put garbage (e.g. "fhlsdljkfds") in the .htaccess file, I get error 500. So the .htaccess file is parsed.
But when I put:
RewriteEngine on
RewriteRule ^/intranet$ /internet [R]
Its ignored. I also create a log file for the mod_rewrite, and the log file is create but has the filesize of 0 bytes.
Does somebody knows how to tell mod_rewrite to not ignore the .htaccess file?
Best regards,
saf
--
E-Mail sent with anti-spam site TrashMail.net!
Free disposable email addresses: http://www.trashmail.net/
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] RewriteRule ignored in .htaccess file in Apache 2.2.3
Posted by Joshua Slive <jo...@slive.ca>.
On 4/24/07, uxwrstre <ux...@trashmail.net> wrote:
> I tried to use RewriteRule in a .htaccess file and it does not work. Its totally ignored by mod_rewrite. And its strange because in the configuration file of Apache it works.
> RewriteRule ^/intranet$ /internet [R]
Prefix matching rules are different in .htaccess files. See the
"Per-directory Rewrites" box under
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule
In particular, you'll likely need to remove the leading slash.
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org