Questions tagged [htaccess]
The htaccess tag has no usage guidance.
69
questions
0
votes
0
answers
42
views
Help needed with .htaccess
I have a website which needs to be changed from Nginx to Apache webserver.
The index directory is nl.html but the HTML extension is removed from the address bar.
If I visit the website example.com it ...
1
vote
2
answers
71
views
Not working `<Location/>` tag in Apache Virtual host
I am trying to create Apache virtualhost that is closed for all IP addresses with exception of one IP address and two URLs that should be publicly accessible.
<IfModule mod_ssl.c>
<...
0
votes
1
answer
267
views
How to generate index.html for each directory under /var/www/html
I have downloaded confluent software for upgrade under /var/www/html directory. I need to create an index.html for directory listing for each directory. I tried adding below to .htaccess file in the ...
-1
votes
2
answers
114
views
allow display and or execution of web files but not direct url access using htaccess
What I want to Achieve is:
I want to be able to display the (mp4 | jpg | ico) file types and execute the (js | css) file types on the browser only on my domain but I dont want them to directly access ...
0
votes
0
answers
31
views
Set cache-control in .user.ini
I have a new AlmaLinux 9 installation with apache and php installed. I am converting my .htaccess files to .user.ini Although going well, I can't figure out the user.ini equivalent of the following:...
2
votes
1
answer
667
views
php_value settings in .htaccess
I am in the process of migrating an Apache WordPress site from CentOS7 to AlmaLinux9.
I installed standard LAMP stuff on the AlamLinux9 system, and restored the MySQL and copied over the html ...
0
votes
0
answers
56
views
How to configure Apache for Authentication
i've got a Netgear Readynas 212 and I'm trying to set up a directory isting for a share.
Shares are located in /data/, where /data/share/ is the folder supposed to be listed.
On the NAS initial Share ...
0
votes
0
answers
62
views
prohibit access to pdf files via URL
Simply I am trying to prevent access to all pdf files on my server from being reached and downloaded using URL Eg https://domain.com/test.pdf .
What I succeed to do is : to prevent indexing them, but ...
0
votes
1
answer
259
views
Block access to an URL path by many IPs in .htaccess
I am only able to use .htaccess so <Location> and <Directory> are not possible.
I am currently using this to block access by IP:
<RequireAll>
Require all granted
Require not ip 1....
0
votes
1
answer
35
views
Add lines in every /home/userxxx/public_html/.htaccess file
I have multiple cpanel websites with this file/dir structure:
/home/user0/public_html/.htaccess
/home/user1/public_html/.htaccess
/home/user2/public_html/.htaccess
etc..
And would like to add (not ...
1
vote
1
answer
281
views
.htaccess being ignored by Apache
It seems that the .htaccess file for one of my virtual hosts is being ignored on my production server. The file is identical to working .htaccess files for other vhosts on the same server. Also, the ...
0
votes
0
answers
148
views
Weird behavior on reverse proxy by htaccess
I've set up a reverse proxy on my vps by placing the following .htaccess file under /var/www/html/ecommerce/app.
DirectoryIndex disabled
RewriteEngine On
RewriteRule ^(.*)$ http://127.0.0.1:3000/$1 [...
0
votes
0
answers
776
views
FilesMatch htaccess syntax pain for apache 2.4
someone please tell me why this doesn't work in .htaccess?
#grant access if word-processing format
<FilesMatch "\.([Pp][Dd][Ff]|[Dd][Oo][Cc][Xx]?|[Rr][Tt][Ff]|[Oo][Dd][Tt]|[Tt][Xx][Tt]|[Ww][Pp]...
-1
votes
1
answer
74
views
Problems with .htaccess and slash
I'm trying to solve a problem with .htaccess.
I have this lines in my .htaccess, but the website still have a "with slash" version.
Sorry, it's an erotic page
https://carlamila.es/...
-1
votes
2
answers
95
views
SED for thousand of 301 redirections on htaccess?
I got a headache with URLS after change them on one of my websites.
The URLs were very long and I decided to change them despite the later change via .htacces...
I'm making the change one by one (I ...