Forum Moderators: phranque
RewriteEngine On
RewriteBase /
RewriteRule ^user1(.*)$ /showgallery.php?cat=500&ppuser=1
RewriteRule ^user2(.*)$ /showgallery.php?cat=500&ppuser=2
RewriteRule ^user3(.*)$ /showgallery.php?cat=500&ppuser=23
however, the following results in the 500 error
RewriteEngine On
RewriteCond %{HTTP_host}!^www\.mysite\.com$
RewriteRule ^(.*)$ [mysite.com...] [R=permanent,L]
Any ideas why?
Make sure you have a space ahead of the "!" in the RewriteCond.
Also, you should test to make sure the HTTP_HOST variable is not empty, in order to prevent putting true HTTP/1.0 user-agents into an infinite redirection loop, and omit the end-anchor from the pattern in case a port number is appended to the HTTP_HOST:
RewriteEngine On
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} [b]![/b]^www\.mysite\.com
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=permanent,L]
RewriteEngine On
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.mysite\.com
RewriteRule ^(.*)$ [mysite.com...] [R=permanent,L]
There's no server error just not updating the address bar :(
LoadModule rewrite_module libexec/mod_rewrite.so
LoadModule php4_module libexec/libphp4.so
LoadModule bwlimited_module libexec/mod_bwlimited.so
LoadModule bytes_log_module libexec/mod_log_bytes.so
LoadModule auth_passthrough_module libexec/mod_auth_passthrough.so
#LoadModule gzip_module libexec/mod_gzip.so
ClearModuleList
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_so.c
AddModule mod_setenvif.c
<IfDefine SSL>
AddModule mod_ssl.c
</IfDefine>
AddModule mod_frontpage.c
AddModule mod_php4.c
AddModule mod_bwlimited.c
AddModule mod_log_bytes.c
AddModule mod_auth_passthrough.c
#AddModule mod_gzip.c
Is there something else I should look for in the httpd file?
Jim