top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

what is the location of .htaccess file in apache.

+1 vote
87 views

what is the location of .htaccess file in apache. I tried searching for it find . -name ".htaccess" but returns no result

posted Jan 29, 2015 by Squapl Recipes

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

.htaccess file should be at the home of the website i.e. /var/www/html or something similar. Let me know if looking something different.

answer Jan 29, 2015 by Salil Agrawal
Similar Questions
+1 vote

I googled but cant figure it out.

0 votes

I really don't understand some things about htaccess. Reading, the advice is: never permit htaccess to users. So, can I enable htaccess but only for personalize something like this?

ErrorDocument 400 /errors/badrequest.html
ErrorDocument 401 /errors/authreqd.html
ErrorDocument 403 /errors/forbid.html
ErrorDocument 404 /errors/notfound.html
ErrorDocument 500 /errors/serverr.html

and obviously deny all other directives? so an user with own htaccess file, can only personalize that directives.

0 votes

I have problems making successfully a rewrite rule for my Webapplication (CodeIgniter) with mod_rewrite.

In my ".htaccess" file, I have the following rewrite rules:

RewriteEngine on
RewriteRule ^[css|js|fonts](/.*)?$ /static$1 [L]
RewriteRule ^(.*)$ /index.php/$1 [L]

But the 1st rule doesn't work, neither I know if the rule was correct.

I want first:

/css/* -> /static/css/*
,/js/* -> /static/css/*
/fonts/* -> /static/fonts/*

and anything else

/index.php/

The second rule seems to work. But the 1st rule makes me headache.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...