You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by nocturnal <no...@swehack.se> on 2006/10/20 10:54:59 UTC
[users@httpd] Problems using RewriteRules in .htaccess
Hi
I've used mod_rewrite in my vhost before but now i need to move the
rules into a .htaccess file so i read the 2.2 manual and took the
following steps. Made sure FollowSymLinks was in Options in the vhost,
made sure i had AllowOverride FileInfo and then i simply placed
RewriteEngine on and my RewriteRules in my .htaccess files. I got no 500
errors as you do when the .htaccess file is wrong but the rules simply
refused to work. I find no errors at all in error_log that tell me why
the rules are not working. They worked just fine when i had them in my
vhost.
What steps have i missed?
This is everything i have in one of the .htaccess files i'm trying to
get working.
RewriteEngine on
RewriteRule ^/([A-Za-z\-\_]+)$ /podwiki.pl?page=$1 [PT]
--
Med vänliga hälsningar
Stefan Midjich aka nocturnal
[Swehack] http://swehack.se
---------------------------------------------------------------------
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] Problems using RewriteRules in .htaccess
Posted by Vincent Bray <no...@gmail.com>.
On 10/20/06, nocturnal <no...@swehack.se> wrote:
> What steps have i missed?
> RewriteEngine on
> RewriteRule ^/([A-Za-z\-\_]+)$ /podwiki.pl?page=$1 [PT]
Hi,
In .htaccess files the base uri is stripped. In this case that means
you should remove the leading '/'. (Also, your backslashes are
redundant and so are the ^$ anchors. I've left the latter in to
demonstrate the point about stripping the base uri).
RewriteRule ^([A-Za-z-_]+)$ /podwiki.pl?page=$1 [PT]
--
noodl
---------------------------------------------------------------------
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