[FX.php List] [OFF] Rewrite for forcing http to https possible?
biscuit technologies
biscuit.tech at gmail.com
Wed Sep 17 13:00:18 MDT 2008
Hi Troy,
On my server the .htaccess file is owned by www:www (user:group) and
the permissions are -rw-r--r-- which I believe translates to 644.
In my experience a wrongly formatted htaccess file or one with wrong
permissions will result in an error instead of failing silently.
Have you looked through the logs to see if there's anything related
being reported?
I have Leopard installed on a different computer - send me the
contents of your current htaccess file and I'll give it a try here.
- David
On Wed, Sep 17, 2008 at 10:45 AM, Troy Meyers <tcmeyers at troymeyers.com> wrote:
> David,
>
> I forgot to mention that after that try was fruitless, it occurred to me that mod_rewrite might actually be enabled, but that due to some aspect of the .htaccess file, it wasn't readable or usable. I looked at the permissions, and tried some variations using chmod, but still no luck.
>
> Could there be some aspect of the .htaccess file that needs to be corrected? What are the proper permissions and ownership? Any special encoding or format needed?
>
> -Troy
>
>
>> Hi Troy,
>>
>> I curious to know if you've got this solved and if so, how?
>>
>> - David
>
>
> On Thu, Sep 11, 2008 at 9:18 PM, biscuit technologies
> <biscuit.tech at gmail.com> wrote:
>> Hi troy,
>> according to this:
>> http://michaelkrol.com/2007/10/30/local-web-development-with-os-x-105-leopard/
>> mod_rewrite is on by default in leopard's apache 2.2
>> apache 2 is quite a bit different from previous versions in some ways and
>> I'm not that familiar with it, but I think this thread on the apple
>> discussions site is pretty thorough:
>> http://discussions.apple.com/thread.jspa?threadID=1453778&tstart=8
>> maybe that will help,
>> David
>> On Thu, Sep 11, 2008 at 5:20 PM, Troy Meyers <tcmeyers at troymeyers.com>
>> wrote:
>>>
>>> David,
>>>
>>> I'm using the Apache 2.2 as comes with Leopard, and I've added the Entropy
>>> PHP 5.5 (Release 6) which is working (phpinfo works).
>>>
>>> The directory that httpd.conf is slightly different in this installation,
>>> it's
>>> /private/etc/apache2/httpd.conf
>>> But no matter, that's to be expected.
>>>
>>> Searching for "mod_rewrite" in httpd.conf all I found is:
>>> LoadModule rewrite_module libexec/apache2/mod_rewrite.so
>>> which is not commented out... but that's the only thing I found.
>>>
>>>
>>>
>>> Looking at the httpd.conf file in the other older Apache (1.3) server
>>> that's in use instead of testing, I find these things:
>>>
>>> LoadModule rewrite_module libexec/httpd/mod_rewrite.so
>>> ....
>>> AddModule mod_rewrite.c
>>> .....
>>> <IfModule mod_rewrite.c>
>>> RewriteEngine On
>>> RewriteCond %{REQUEST_METHOD} ^TRACE
>>> RewriteRule .* - [F]
>>> </IfModule>
>>>
>>>
>>>
>>> Going back to the Apache 2.2 one which is the subject of my problem, I
>>> looked for any instance of "AddModule" in the httpd.conf file, and there
>>> aren't any. It seems like 2.2 must work differently, because the 1.3 has
>>> tons of them. So I guess that's not the problem.
>>>
>>> I don't know. I guess I'll Google more to see if I can find instructions
>>> on how to turn this on for Apache 2.2, because if the test was correct, it
>>> isn't.
>>>
>>> Thanks.
>>>
>>> -Troy
>>>
>>>
>>>
>>>
>>>
>>>
>>> > There's a couple of things to look into. I'm on 10.4.11 and using
>>> > entropy's php, so you might have some differences, but this is what I
>>> > just did. go to /etc/httpd/httpd.conf using your preferred text editor
>>> > (for simplicity sake I used nano) and do a find (cntl-w, ("where")) for
>>> > mod_rewrite and check that it isn't commented out. Mine was fine.
>>> >
>>> > upload the rewrite test to your /Library/Webserver/Documents folder
>>> > with the sample php file and sample .htaccess file and if needed do a
>>> > sudo apachectl restart graceful and give it a try. on my little mini it
>>> > seems to work ok.
>>> >
>>> > if you are accessing a user site folder you'll need to adjust the
>>> > settings in /etc/httpd/users/youruser.conf and that's explained more or
>>> > less well at
>>> > http://michaelkrol.com/2005/11/21/enable-mod_rewrite-on-os-x-104-tiger/
>>> > but to be honest I've had a lot easier time always using the root
>>> > (/Library/Webserver/Documents) directory for serving custom stuff.
>>> >
>>> > - David
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
More information about the FX.php_List
mailing list