Ask Your Question

.htaccess not working!

asked 2012-10-24 02:42:24 -0500

ABLFRM gravatar image

hi I'm a php Developer and in my fedora (XAMPP installation) .htaccess files does not work. i found many articles and post and did its,but its not been fix. can you help me please? thanks

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2012-10-24 05:15:48 -0500

kvolny gravatar image

just a thought ... are they readable by the server (I mean correct ownership, permissions and selinux contexts)? - if you create files by hand as root using some text editor, they will be inacessible until you fix the access rights

I'd expect something like

$ ls -lZ /srv/gallery2/kavol/.htaccess
-rw-rw-rw-. apache apache unconfined_u:object_r:httpd_sys_rw_content_t:s0 /srv/gallery2/kavol/.htaccess

while after creating the file you'll get this:

# ls -lZ /srv/gallery2/kavol/wrongperms
-rw-r--r--. root root unconfined_u:object_r:var_t:s0   /srv/gallery2/kavol/wrongperms

which will NOT work ...

edit flag offensive delete link more

answered 2012-10-24 06:06:32 -0500

apahim gravatar image

updated 2012-10-24 06:07:11 -0500

Your "Directory" section in httpd.conf must be configured with "AllowOverride All":

<Directory "/your/site/dir">
    AllowOverride All
edit flag offensive delete link more

answered 2012-10-24 04:49:52 -0500

What exactly doesn't work for you? Can you share your htaccess file in pastebin. How do you configure httpd. You need to provide little more info

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2012-10-24 02:42:24 -0500

Seen: 3,179 times

Last updated: Oct 24 '12