Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : .htaccess File Not Being Read



Threaded Mode | Print  

 .htaccess File Not Being Read (8 Replies, Read 13879 times)
KenSander
Group: Member
Post Group: Newbie
Posts: 12
Status:
Runing os x mavericks with new install of ampps.

Doing dev work, no domain, so setup an alias. I'm running a CMS and trying to get mod_rewrite to work for clean URLs but I don't think my .htaccess file is being loaded at all. I checked apache settings and mod_rewrite is enabled, ran phpinfo(); from alias root and shows it as being loaded.

No matter what I put in the .htaccess file, it doesn't appear to load. I typed giberish in it like "dladlkjadlfkna" just to case an error, and the site continues to load.

The CMS works fine, so php/mysql is no problem, it just doesn't seem to recognize .htaccess files.

How do I debug this further?
IP: --   

.htaccess File Not Being Read
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Write the following in .htaccess:

Code
deny from all


It should give 403 Forbidden error


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

.htaccess File Not Being Read
KenSander
Group: Member
Post Group: Newbie
Posts: 12
Status:
Ya the site continues to load fine.

I created a new alias and site with no CMS, just a blank folder with an index.html page. Put an .htaccess file in there as well, and again, not being loaded. Just wanted to test it on a blank area to double check.
IP: --   

.htaccess File Not Being Read
KenSander
Group: Member
Post Group: Newbie
Posts: 12
Status:
I had a look through ampps/conf/httpd.conf and AllowOverride is set to All. I even put AccessFileName .htaccess just in case and restarted. Still nothing.

Is it being overridden elsewhere or different issue?
IP: --   

.htaccess File Not Being Read
KenSander
Group: Member
Post Group: Newbie
Posts: 12
Status:
I meant apache's httpd.conf. Would have edited the post but don't see a way.
IP: --   

.htaccess File Not Being Read
KenSander
Group: Member
Post Group: Newbie
Posts: 12
Status:
I found the problem.

Alias were being created with AllowOverride set to None in ampps/apache/conf/extra/alias.conf

I'll look into it, but any idea how to set the default to "All" so I don't have to change this file every time I setup a new alias for a new account?
IP: --   

.htaccess File Not Being Read
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Apparently you cannot do it from Panel. You can create a conf file manually though.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

.htaccess File Not Being Read
KenSander
Group: Member
Post Group: Newbie
Posts: 12
Status:
Could you elaborate more in this as I'm not much of a sysadmin?

The file ampps/apache/conf/extra/alias.conf contains all the alias rules and gets edited every time a new one is created, so am I setting up a default .conf file somewhere that sets the rule?
IP: --   

.htaccess File Not Being Read
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Quote From : KenSander November 8, 2013, 2:00 pm
Could you elaborate more in this as I'm not much of a sysadmin?

The file ampps/apache/conf/extra/alias.conf contains all the alias rules and gets edited every time a new one is created, so am I setting up a default .conf file somewhere that sets the rule?


Yes. You can create a .conf of your own similar to the one you can see in alias.conf then include it in httpd.conf the same way alias.conf has been included.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is April 26, 2024, 12:42 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.030