.htaccess files (or "distributed configuration files") provide a way to make configuration changes on a per-directory basis.
Questions tagged [.htaccess]
79 questions
61
votes
6 answers
Is this a correct way to enable htaccess in Apache 2.4.7
In almost every solution of "How to activate htaccess", they say that the /etc/apache2/sites-available/default file needs to be edited. But there isn't such file in Apache 2.4.7
I read somewhere that the new default file is 000-default.conf. So I…
CluelessNoob
- 2,383
32
votes
3 answers
Enabling .htaccess file to rewrite path (not working)
All the tutorials tell me to edit the: /etc/apache2/sites-available/default but this file doesn't exist for me. Within this file I would have to edit the:
Options Indexes FollowSymLinks MultiViews
AllowOverride…
inControl
- 423
15
votes
2 answers
.htaccess Error : Invalid command 'AuthGroupFile'
before this i was working on windows and my project was working proper. recently i moved to ubuntu and i am trying setup project on LAMP.
i have created host for this (windows i was running directly through localhost) and when i am running it…
Kalpit
- 269
6
votes
2 answers
Why do I get 404 on LAMP Permalinks (Using wordpress)
I have been working on a website on an ubuntu server (amazone) and I get 404s entering pages.
I'll give all the information I can regarding the problem.
On WordPress
Refresh page:
I followed this tutorial:…
Kar19
- 459
- 1
- 7
- 28
5
votes
1 answer
Password protect directory listing only and not the files themselves
I have in my /home/sammy/public_html/cache/.htaccess
Options +Indexes
AuthType Basic
AuthName "Authentication Required"
AuthUserFile /home/sammy/public_html/cache/.htpasswd
Require valid-user
But I only want the directory…
anjanesh
- 703
4
votes
5 answers
how to config htaccess file after enabling mod_rewrite module?
I already install apache2 then i enable the mod_rewrite module like this:
sudo a2enmod rewrite
after enabling i am confused about these lines, i can't understand what to do with them, as far as i know that what i have to do with these lines is that…
jazz_razor
- 73
4
votes
1 answer
.htaccess not working (apache2 | ubuntu 18.04)
guys the website is working fine, just the file .htaccess that doesn't work, i googled a lot, already enabled a2enmod rewrite and tried a lot of stuff but it didn't work.
obs: i'm using the website example.com as example
this how my…
Felipe S.
- 49
3
votes
4 answers
.htaccess is not working on Ubuntu 16.04.2 LTS
I want to use .htaccess for rewriting of php web pages. Or in a simple way "I don't want to use .php extension" to access any web page.
.htaccess file (Ubuntu 14) which was working perfectly:
RewriteEngine on
#remove the need for .php…
MSVKC
- 31
3
votes
2 answers
.htaccess file not running and internal server error
I am using ubuntu 14.04 and have LAMP environment. I have one of the project in dir /var/www/html/project1 . It can't access the .htaccess file for rewriting url rules.
For that i have to change in /etc/apache2/apache2.conf file
Farman Ali
- 347
3
votes
1 answer
How to make the file accessible only through its own server?
I've added this in the .htaccess the file located in the root of the project:
Require host lamtakam.test lamtakam.com
Require ip ::1 95.216.xx.xx
I've used xx.xx to keep my real ip hidden in a public community, in…
Martin AJ
- 191
2
votes
2 answers
How to Edit Apache2.conf | Permission Denied - Amazon AWS (EC2)
I'm trying upload the edited apache2.conf but getting File Permission Denied Error.
Status: Starting upload of O:\Users\Circle Radius\SRPL\apache2.conf
Command: cd "/etc/apache2"
Response: New directory is: "/etc/apache2"
Command: put…
Arpit Mittal
- 29
- 2
- 2
- 6
2
votes
1 answer
accessing htaccess protected pages from ubuntu touch browser
I tried to access a webpage, which is password protected by htaccess (apache server ...) from my bq aquaris running Ubuntu touch 5.0.
The browser gave me no options to enter the username/password and displayed the following error:
The server could…
treakec
- 63
2
votes
1 answer
DocumentRoot is password protected but no htaccess file?
At some point I pw protected /var/www/ for security purposes (my actual hosted websites are located in a different path), now I would like to host something publicly in /var/www/ but do not know how to remove the pw protection. There is no .htaccess…
user1765369
- 123
2
votes
1 answer
How do I write an Apache .htaccess file to force a 'friendly' URL?
I have a small PHP MVC framework which runs on a droplet that uses Ubuntu and I'm trying to make all the URLs 'friendly'. From:
index.php?u=controller/method/param
To:
controller/method/param
For that I'm using a .htaccess file containing this…
emma
- 175
2
votes
1 answer
Apache web server - how to strip language extentions
This question pertains to publishing the Ubuntu Serverguide on help.ubuntu.com. For the 20.04 LTS cycle, there will (O.K. might) be significant changes to the source code workflow for the Ubuntu Serverguide. Currently, translations are not being…
Doug Smythies
- 16,146