mod_rewrite error

Problems with the Linux version of XAMPP, questions, comments, and anything related.

mod_rewrite error

Postby tsmr » 31. August 2012 16:20

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

Code: Select all
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?
tsmr
 
Posts: 1
Joined: 31. August 2012 16:13
XAMPP Version: 5.6.3
Operating System: Debian

Re: mod_rewrite error

Postby JonB » 31. August 2012 20:55

Has this syntax worked before?
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 7 guests