httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Moe <>
Subject [users@httpd] mod_rewrite is ignored or disabled
Date Sun, 28 Jun 2015 20:02:44 GMT
  httpd v2.4.10
  linux v3.16.7-21-desktop x86_64

  I am consolidating a discussion started in message "ReDirect
question". The issue there is that mod_rewrite is simply ignored.
Below are the contents of .htaccess and vhost.
  In both .htaccess and vhost the Rewrite* directive are simply
ignored as though they are commented out. (If I make a syntax error,
"Internal Server Error" occurs. Otherwise, nothing.) On our public
site which is running httpd v2.2, both rewrites perform as expected.
  Kurtis Rader and Eric Covener have patiently made a number of
suggestions to diagnose the problem. No joy, yet.

  What I am doing: We are moving our business suite to a new service
and we are using their shopping cart. The rewrites will point existing
category and specific product URLs to corresponding locations at the
new site based on the query string.

----[ .htaccess ]----
Options +ExecCGI +FollowSymLinks
#  Specific redirects first, then fallback
RewriteEngine on
RewriteCond %{QUERY_STRING} =app=ecom&ns=catshow&ref=books
RewriteRule ^
RewriteEngine off
# The fallback. Will be changed to point to ya250.... later.
Redirect /catalog/
----[ end ]----

----[ vhost ]----
# 20100606: Local copy of the Version 3 site
<VirtualHost *:80>

    DocumentRoot "/data01/t-drv/websites/sma-v3"
    ErrorDocument 404 /404.php
    ErrorDocument 410 /410.php
    ErrorDocument 401 /401.php

    ErrorLog  "/data01/t-drv/websites/.logs/sma-v3-error_log"
    CustomLog "/data01/t-drv/websites/.logs/sma-v3-access_log" common

 <Directory "/data01/t-drv/websites/sma-v3">
    AllowOverride FileInfo Authconfig Options
    Options Indexes FollowSymLinks MultiViews

    AddHandler application/x-httpd-php .php
    MultiviewsMatch Handlers

    Order allow,deny
    Allow from all

    AllowOverride All
# Always use a secure connection (at SMA site, this is in .htaccess)
    RewriteEngine On
    RewriteCond %{SERVER_PORT} =80
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L]
 <Files *>
   Forcetype application/x-http-php
 <Files *\.*>
   Forcetype none


## SSL Virtual Host Context
<IfDefine SSL>
#   Some MIME-types for downloading Certificates and CRLs
  AddType application/x-x509-ca-cert .crt
  AddType application/x-pkcs7-crl    .crl

<IfModule mod_ssl.c>
<VirtualHost *:443>

#  General setup for the virtual host
  DocumentRoot "/data01/t-drv/websites/sma-v3"
  ErrorLog  "/data01/t-drv/websites/.logs/sma-v3s-error_log"
  CustomLog "/data01/t-drv/websites/.logs/sma-v3s-access_log" common
  TransferLog "/data01/t-drv/websites/.logs/access_log"

  ErrorDocument 404 /404.php
  ErrorDocument 410 /410.php
  ErrorDocument 401 /401.php

 <Directory "/data01/t-drv/websites/sma-v3">
    AllowOverride Authconfig
    AllowOverride All
    Options -ExecCGI

 SSLEngine on

 SSLCertificateFile "/data01/t-drv/websites/.conf/ssl/sma-v3-site.crt"

 SSLProtocol ALL -SSLv2

 SetEnvIf User-Agent ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0


----[ end ]----

James Moe
moe dot james at sohnen-moe dot com

View raw message