mod_rewrite not working in user folders?
Hi everybody,
I experience a odd problem and maybe somebody can help. I use a 10.5.8 OS X Server running Apache with PHP 5.3.0.3 entropy update and all works fine.
Today I tried to create .htaccess file to redirect some http requests, also known as url rewriting using mod_rewrite.so. I tried to create a file in /Library/WebServer/Documents with this content:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) index.php?site=$1 [L]
and a index.php file with this content:
<pre>
<?
print_r($_REQUEST);
?>
</pre>
This prints, whatever was given as parameter to my page… as expected.
Little later i wanted to use the very same files in my User Folder, which is based in /Volumes/Users/Userdata/username/Sites/ and it does not work, the url rewriting does not work and I always get 404 message. Looks like the Rewrite Rules never get loaded…
Is there any way to enable url rewriting for Users? Where is the config file that forces an "AllowOverride None" for my users? Any ideas?
I had a similar problem with php earlier on, which was parsed php files in the main document directory but not within user folders… odd enough, the default configuration(no php.ini loaded) does not cause this kind of problem, but if i load a php.ini eg. php.ini-recommended no filles will be parsed in my users sites directory.
this is not unique to my user account and affects all users on the server 😟
any ideas?
I experience a odd problem and maybe somebody can help. I use a 10.5.8 OS X Server running Apache with PHP 5.3.0.3 entropy update and all works fine.
Today I tried to create .htaccess file to redirect some http requests, also known as url rewriting using mod_rewrite.so. I tried to create a file in /Library/WebServer/Documents with this content:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) index.php?site=$1 [L]
and a index.php file with this content:
<pre>
<?
print_r($_REQUEST);
?>
</pre>
This prints, whatever was given as parameter to my page… as expected.
Little later i wanted to use the very same files in my User Folder, which is based in /Volumes/Users/Userdata/username/Sites/ and it does not work, the url rewriting does not work and I always get 404 message. Looks like the Rewrite Rules never get loaded…
Is there any way to enable url rewriting for Users? Where is the config file that forces an "AllowOverride None" for my users? Any ideas?
I had a similar problem with php earlier on, which was parsed php files in the main document directory but not within user folders… odd enough, the default configuration(no php.ini loaded) does not cause this kind of problem, but if i load a php.ini eg. php.ini-recommended no filles will be parsed in my users sites directory.
this is not unique to my user account and affects all users on the server 😟
any ideas?
xServe, Mac OS X (10.5)