httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Knowlton" <jknowl...@vp44.com>
Subject [users@httpd] mod_rewrite rules give 500 error
Date Fri, 31 Aug 2012 15:28:08 GMT
Hi all.
I have a very simple mod_rewrite .htaccess rule to transform urls like
“domain.com/new/” to “domain.com/index.php?page=new”.
Unfortunately, it does not seem to be working :(

.htaccess syntax

    RewriteEngine on
    RewriteCond %{REQUEST_SCRIPT} !-f
    RewriteCond %{REQUEST_SCRIPT} !-d
    RewriteCond %{REQUEST_SCRIPT} !-l
    RewriteRule ^([A-Za-z0-9-]+)?$ index.php?page=$1



This is from the mod_rewrite log:

    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (2) init rewrite engine
with requested uri /acbc1
    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (1) pass through /acbc1
    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (3) [perdir
/www/domain.com/] strip per-dir prefix: /www/domain.com/acbc1 -> acbc1
    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (3) [perdir
/www/domain.com/] applying pattern '^([A-Za-z0-9-]+)?$' to uri 'acbc1'
    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (2) [perdir
/www/domain.com/] rewrite 'acbc1' -> 'index.php?short=acbc1'
    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (3) split
uri=index.php?short=acbc1 -> uri=index.php, args=short=acbc1
    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (3) [perdir
/www/domain.com/] add per-dir prefix: index.php ->
/www/domain.com/index.php
    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (2) [perdir
/www/domain.com/] strip document_root prefix:
/www/domain.com/index.php -> /index.php
    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (1) [perdir
/www/domain.com/] internal redirect with /index.php [INTERNAL
REDIRECT]
    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#2436750/initial/redir#1] (2) init rewrite
engine with requested uri /index.php
    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#2436750/initial/redir#1] (1) pass through
/index.php
    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#2436750/initial/redir#1] (3) [perdir
/www/domain.com/] strip per-dir prefix: /www/domain.com/index.php ->
index.php
    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#2436750/initial/redir#1] (3) [perdir
/www/domain.com/] applying pattern '^([A-Za-z0-9-]+)?$' to uri
'index.php'
    10.10.14.132 - - [31/Aug/2012:17:11:43 +0200]
[domain.com/sid#2217478][rid#2436750/initial/redir#1] (1) [perdir
/www/domain.com/] pass through /www/domain.com/index.php
    10.10.14.132 - - [31/Aug/2012:17:11:44 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (2) init rewrite engine
with requested uri /favicon.ico
    10.10.14.132 - - [31/Aug/2012:17:11:44 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (1) pass through
/favicon.ico
    10.10.14.132 - - [31/Aug/2012:17:11:44 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (3) [perdir
/www/domain.com/] strip per-dir prefix: /www/domain.com/favicon.ico ->
favicon.ico
    10.10.14.132 - - [31/Aug/2012:17:11:44 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (3) [perdir
/www/domain.com/] applying pattern '^([A-Za-z0-9-]+)?$' to uri
'favicon.ico'
    10.10.14.132 - - [31/Aug/2012:17:11:44 +0200]
[domain.com/sid#2217478][rid#242bdd0/initial] (1) [perdir
/www/domain.com/] pass through /www/domain.com/favicon.ico



Any clues?

-JK


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message