httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Michener <>
Subject [users@httpd] A newbie question about mod_rewrite configuration
Date Tue, 20 Mar 2007 21:00:42 GMT
Hi - I'm trying to create a mod_rewrite solution to the following problem:
 I want to enter 
 and have mod_rewrite translate that URL to
 Also, I want the solution to reside within my main Apache 2.24 configuration file (rather
than using .htaccess)
 After reading many suggestions here and ..., this is what I've done so far (with the results
of 404 error - URL \1234abc not found)
 LoadModule rewrite_module modules/ 

[note: phpinfo says the module is 'present' and if I enter the URL ...?SKU=1234abc, it works]
 <Directory />
     Options FollowSymLinks
     AllowOverride None
     Order deny,allow
     Deny from all
     Satisfy all
 <Directory "C:/Apache/www-new">
     Options Indexes FollowSymLinks
     AllowOverride All
     Order allow,deny
     Allow from all
 <IfModule dir_module>
     DirectoryIndex index.html index.php index.php3 index.phtml
 RewriteLog logs/rewrite.log                                   Note: never hits rewrite.log
 RewriteLogLevel 9
 RewriteEngine ON
 #    RewriteRule  ^//([A-Za-z0-9-]+)/.htm$ Index.php?SKU=$1
 #    RewriteRule ^(.*)\.htm$ index.php?SKU=$1
 RewriteRule ^([^/]+).htm$ index.php?SKU=$1 [R]
 # Virtual Hosts
 NameVirtualHost *:80
 <VirtualHost *:80>
     DocumentRoot www-new/MyVirtualDomain
 Help/suggestions are appreciated!!!
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.
View raw message