mod_rewrite and leopard

Discussion in 'macOS' started by bdude, Jan 28, 2008.

  1. bdude macrumors newbie

    Joined:
    Jan 28, 2008
    #1
    Hey guys, I'm having some trouble using apache .htaccess and mod_rewrite. I've altered my bryce.conf file to allow overrides, and now Apache is bringing a 500 error, in the error log it says
    Code:
    [Tue Jan 29 18:27:20 2008] [alert] [client 127.0.0.1] /Users/bryce/Sites/.htaccess: order takes one argument, 'allow,deny', 'deny,allow', or 'mutual-failure', referer: http://localhost/~bryce/sym/
    
    Help is appreciated,
    cheers - bdude

    This is my /users/bryce.conf:
    Code:
    <Directory "/Users/bryce/Sites">
    	Options Indexes MultiViews
    	AllowOverride All
    	Order allow,deny
    	Allow from all
    </Directory>
    
    This is the .htaccess file I'm using:
    Code:
    
    		
    ### Symphony 2.0 - Do not edit ###
    
    <IfModule mod_rewrite.c>
    	RewriteEngine on
    	RewriteBase /~bryce/sym/
    
    	### DO NOT APPLY RULES WHEN REQUESTING "favicon.ico"
    	RewriteCond %{REQUEST_FILENAME} favicon.ico [NC]
    	RewriteRule .* - [S=14] 
    
    	### IMAGE RULES	
    	RewriteRule ^image\/3\/([0-9]+)\/([0-9]+)\/([1-9])\/([a-fA-f0-9]{3,6})(\/(0|1))?\/(.+)\.(jpg|gif|jpeg|png|bmp)$ /~bryce/sym/symphony/image.php?param=3:$1:$2:$3:$4:$6:$7.$8 [L]
    	RewriteRule ^image\/2\/([0-9]+)\/([0-9]+)\/([1-9])(\/(0|1))?\/(.+)\.(jpg|gif|jpeg|png|bmp)$ /~bryce/sym/symphony/image.php?param=2:$1:$2:$3:0:$5:$6.$7 [L]
    	RewriteRule ^image\/1\/([0-9]+)\/([0-9]+)(\/(0|1))?\/(.+)\.(jpg|gif|jpeg|png|bmp)$ /~bryce/sym/symphony/image.php?param=1:$1:$2:0:0:$4:$5.$6 [L]
    	RewriteRule ^image(\/(0|1))?\/(.+)\.(jpg|gif|jpeg|png|bmp)$ /~bryce/sym/symphony/image.php?param=0:0:0:0:0:$2:$3.$4 [L]
    
    	### CHECK FOR TRAILING SLASH - Will ignore files
    	RewriteCond %{REQUEST_FILENAME} !-f
    	RewriteCond %{REQUEST_URI} !/~bryce/sym$
    	RewriteCond %{REQUEST_URI} !(.*)/$
    	RewriteRule ^(.*)$ /~bryce/sym/$1/ [L,R=301]
    
    	### MAIN REWRITE - This will ignore directories
    	RewriteCond %{REQUEST_FILENAME} !-d
    	RewriteRule ^(.*)\/$ /~bryce/sym/index.php?page=$1&%{QUERY_STRING}	[L]
    
    </IfModule>
    
    DirectoryIndex index.php
    IndexIgnore *
    
    ######		
    
    
     
  2. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    Tried putting single quotes round allow,deny?
     
  3. bdude thread starter macrumors newbie

    Joined:
    Jan 28, 2008
  4. bdude thread starter macrumors newbie

    Joined:
    Jan 28, 2008
  5. philsbury macrumors newbie

    Joined:
    Mar 2, 2009

Share This Page