How to make htaccess work

This is a discussion on How to make htaccess work within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi all, some problems with the new installed SuseLinux 9.2 and Apache 2 here. Server does not seem to ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-25-2005
Patrick Beerhorst
 
Posts: n/a
Default How to make htaccess work

Hi all,

some problems with the new installed SuseLinux 9.2 and Apache 2 here.
Server does not seem to accept any htaccess files in any directory.
IŽd copied some working htaccess files using mod_rewrite from Win32
PC (using Apache 1.3.33 there) to the Linux machine (via Samba).
After setting up the haccess files to make mod_rewrite work I found out
he wasnŽt using any rules I did to the access file.

I tested

ErrorDocument 404 http://www.test.com/error/404.html

Options +FollowSymLinks
RewriteEngine on

#basic rule
RewriteRule ^([a-z]*).html$ index.php?vp=$1.php

But rewrite didnt work and server displayed standard 404 error page, so
htaccess
didnŽt seem to be used at all.

What changes in the Apache configs have to be done to make htaccess to be
used?

Greetings
Patrick


  #2 (permalink)  
Old 01-25-2005
Mike Peters
 
Posts: n/a
Default Re: How to make htaccess work

On 2005-01-25, Patrick Beerhorst wrote:
> Hi all,
>
> some problems with the new installed SuseLinux 9.2 and Apache 2 here.
> Server does not seem to accept any htaccess files in any directory.
> IŽd copied some working htaccess files using mod_rewrite from Win32
> PC (using Apache 1.3.33 there) to the Linux machine (via Samba).
> After setting up the haccess files to make mod_rewrite work I found out
> he wasnŽt using any rules I did to the access file.
>
> I tested
>
> ErrorDocument 404 http://www.test.com/error/404.html
>
> Options +FollowSymLinks
> RewriteEngine on
>
> #basic rule
> RewriteRule ^([a-z]*).html$ index.php?vp=$1.php
>
> But rewrite didnt work and server displayed standard 404 error page, so
> htaccess
> didnŽt seem to be used at all.
>
> What changes in the Apache configs have to be done to make htaccess to be
> used?
>

You need to make sure that the 'AllowOverride' directive is set to
something other than 'None' (eg 'All' or some particular directive) for
the directory you are accessing. eg in http.conf:

<Directory "/var/www/htdocs/test">
AllowOverride All
Order allow,deny
Allow from all
</Directory>


--
Mike Peters
mike [-AT-] ice2o [-DOT-] com
http://www.ice2o.com
  #3 (permalink)  
Old 01-25-2005
Patrick Beerhorst
 
Posts: n/a
Default Re: How to make htaccess work

Hi Mike,

I did these minor changes and restarted the Apache, put a test .htacess in
the
dir:

AuthUserFile /srv/www/htdocs/test/.htpasswd
AuthType Basic
AuthName "test"
require valid-user

So a popup should apear when browsing to this dir. Result: Browser
displays the page. Testet that on Win32 with 1.3.33: working fine,
popup apears...

Settings in the httpd.conf (Win)

<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>

Greetings
Patrick



"Mike Peters" <o0__mike__0oREMOVE@THIShotmail.com> schrieb im Newsbeitrag
news:1106653248.ed4d40c2579b0c6b3df67754c39880c8@t eranews...
> On 2005-01-25, Patrick Beerhorst wrote:
>> Hi all,
>>
>> some problems with the new installed SuseLinux 9.2 and Apache 2 here.
>> Server does not seem to accept any htaccess files in any directory.
>> IŽd copied some working htaccess files using mod_rewrite from Win32
>> PC (using Apache 1.3.33 there) to the Linux machine (via Samba).
>> After setting up the haccess files to make mod_rewrite work I found out
>> he wasnŽt using any rules I did to the access file.
>>
>> I tested
>>
>> ErrorDocument 404 http://www.test.com/error/404.html
>>
>> Options +FollowSymLinks
>> RewriteEngine on
>>
>> #basic rule
>> RewriteRule ^([a-z]*).html$ index.php?vp=$1.php
>>
>> But rewrite didnt work and server displayed standard 404 error page, so
>> htaccess
>> didnŽt seem to be used at all.
>>
>> What changes in the Apache configs have to be done to make htaccess to be
>> used?
>>

> You need to make sure that the 'AllowOverride' directive is set to
> something other than 'None' (eg 'All' or some particular directive) for
> the directory you are accessing. eg in http.conf:
>
> <Directory "/var/www/htdocs/test">
> AllowOverride All
> Order allow,deny
> Allow from all
> </Directory>
>
>
> --
> Mike Peters
> mike [-AT-] ice2o [-DOT-] com
> http://www.ice2o.com



  #4 (permalink)  
Old 01-25-2005
Mike Peters
 
Posts: n/a
Default Re: How to make htaccess work

On 2005-01-25, Patrick Beerhorst wrote:
> Hi Mike,
>
> I did these minor changes and restarted the Apache, put a test .htacess in
> the
> dir:
>
> AuthUserFile /srv/www/htdocs/test/.htpasswd
> AuthType Basic
> AuthName "test"
> require valid-user
>
> So a popup should apear when browsing to this dir. Result: Browser
> displays the page. Testet that on Win32 with 1.3.33: working fine,
> popup apears...
>
> Settings in the httpd.conf (Win)
>
><Directory />
> Options FollowSymLinks
> AllowOverride All
></Directory>
>

Do you have AccessFileName set to something other than .htaccess? It
should default to .htaccess if it isn't set or you could add:
AccessFileName .htaccess

just to make sure.
--
Mike Peters
mike [-AT-] ice2o [-DOT-] com
http://www.ice2o.com
  #5 (permalink)  
Old 01-25-2005
Patrick Beerhorst
 
Posts: n/a
Default Re: How to make htaccess work

Yes, it is

AccessFileName .htaccess

default - i have not changed that.

Greetings
Patrick




"Mike Peters" <o0__mike__0oREMOVE@THIShotmail.com> schrieb im Newsbeitrag
news:1106656976.0ac77bc930bd50d79d00580999d3f2ef@t eranews...
> On 2005-01-25, Patrick Beerhorst wrote:
>> Hi Mike,
>>
>> I did these minor changes and restarted the Apache, put a test .htacess
>> in
>> the
>> dir:
>>
>> AuthUserFile /srv/www/htdocs/test/.htpasswd
>> AuthType Basic
>> AuthName "test"
>> require valid-user
>>
>> So a popup should apear when browsing to this dir. Result: Browser
>> displays the page. Testet that on Win32 with 1.3.33: working fine,
>> popup apears...
>>
>> Settings in the httpd.conf (Win)
>>
>><Directory />
>> Options FollowSymLinks
>> AllowOverride All
>></Directory>
>>

> Do you have AccessFileName set to something other than .htaccess? It
> should default to .htaccess if it isn't set or you could add:
> AccessFileName .htaccess
>
> just to make sure.
> --
> Mike Peters
> mike [-AT-] ice2o [-DOT-] com
> http://www.ice2o.com




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:09 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0