Re: RewriteRule

From: Date: Sun, 12 Oct 2008 18:40:25 +0000
Subject: Re: RewriteRule
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-281767@lists.php.net to get a copy of this message
#.htaccess RewriteEngine on RewriteBase / #Apache recurses into htaccess 3 times so we have to make sure not to overwrite an already processed rule RewriteCond %{REQUEST_URI} !^.*(\.php|\.css|\.js|\.html|\.ico|robots\.txt).*$ #The rewrite condition below can be used to pass through GET parameters (direct access) #RewriteCond %{THE_REQUEST} !^.*\?getparam1=.*$ # /blog/*/**/*** -----> blog.php?getparam1=*&getparam2=** #RewriteRule /blog[/]{0,}([a-zA-Z0-9 ]{1,})[/]{0,}([a-zA-Z0-9 ]{1,})[/]{0,}[.*]{0,}$ blog.php?getparam1=$1&getparam2=$2 RewriteRule ^blog[/]{0,}([^/]{0,})[/]{0,}([^/]{0,})[/]{0,}.*$ blog.php?getparam1=$1&getparam2=$2 [NC,QSA,L] # All not found requests --> somefile.php ErrorDocument 404 /somefile.php

« previous php.general (#281767) next »