Re: OT(?): mod_rewrite not passing GET variables to php

From: Date: Fri, 03 Oct 2003 14:46:55 +0000
Subject: Re: OT(?): mod_rewrite not passing GET variables to php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-164909@lists.php.net to get a copy of this message
Steven Jarvis wrote:
RewriteEngine On RewriteRule ^/([a-z]+)/([a-z]+)/$ paper.php?paper=$1&section=$2 [L]
Try this (I'm no mod_rewrite expert, so no promises): RewriteEngine On RewriteRule /^([a-z]+)\/([a-z]+)$/ paper.php?paper=$1&section=$2 [L]
The first try seemed better (in Apache config, '/' means '/' and not 'begin or end of a regex'. But shouldnt be the rewritten url be absolute? Just try this and let us know if its better RewriteEngine On RewriteRule ^/([a-z]+)/([a-z]+)/$ http://myhost.com/path_to_my_dir/paper.php?paper=$1&section=$2 [L] Christophe

« previous php.general (#164909) next »