The hypertext access web server configuration file used for overriding configuration on a per-directory basis.

learn more… | top users | synonyms

0
votes
1answer
16 views

Restart apache on Docker

I am trying to update my .htaccess file on a Docker container. After updating the file, I need to restart Apache. Whenever I try to restart Apache using the command service apache2 restart, I get the ...
0
votes
0answers
5 views

Disallow htaccess authentication for http

I have following piece of code in .htaccess which ask for .htaccess username and password <Limit GET POST> require group group1 require group group2 require group group3 Order deny,allow Deny ...
0
votes
0answers
8 views

.htaccess to hide 2 possible directories

I am having difficulties getting the second statement working regarding admins, i am trying to hide both new and admin parts of the directory. new seems to be hiding fine however admin doesnt want to ...
0
votes
0answers
21 views

how to set up a deny rule (e.g. Apache) to block a IP if it connects more than e.g. 5 times per second?

if I want to block any IPs that connects the server more than 5 times per second, how to do that? I am currently using CloudFlare firewall to manually block such IPs but it would be nice to make it ...
1
vote
0answers
8 views

Deploying web.py project to Bluehost, WSGIServer: missing FastCGI error

I'm trying to deploy a very simple web.py app to my Bluehost website using these instructions. Here's my main python file: #!/usr/bin/python import web from web import form import whitelistchecker ...
0
votes
0answers
10 views

Difference between `Satisfy any` in static config vs. .htaccess

I have an apache webroot with, A .htacces file with: Require all granted Satisfy any Allow from all The .htaccess file itself is viewable through the browser! If I move the Satisfy any from the ...
1
vote
1answer
112 views

How can I compress a jpg images for google insights optimisation

I m getting this error when tring to see the speed of my website in google page speed: Optimize images Properly formatting and compressing images can save many bytes of data. Optimize the following ...
0
votes
1answer
67 views

Allow PHP to execute in a specific subdirectory, when parent directory is denied?

I operate a small shared server and would like to give some of my users the ability to execute PHP code from the browser (but not all of them) but have been unable to do so. In the top level ...
0
votes
1answer
19 views

.htaccess mask on current website

I've got a website on a FTP, mysite, on which I have : /index.php which is my real site /preprod/index.php, which is my pre-production website I want to make the preprod website visible to any ...
1
vote
0answers
22 views

Rewrite without url changing

I would like to redirect (without url changing) from mysite.com/order/business to mysite.com/order/index.php?tariff=business I have this .htaccess: Options +FollowSymLinks RewriteEngine on ...
2
votes
1answer
59 views

Cross-origin directives in httpd.conf?

I am a part time Apache administrator (not by choice). We have an animated gif hit counter. I want to add a CSP to disable active content, but include a CORS policy to allow the gif for the hit ...
0
votes
1answer
64 views

.htaccess RewriteRule to redirect all to root

I would like to redirect every request to root by using RewriteRules in my .htaccess file (later on I will copy them to a vhost file). I tried something like this: RewriteRule ^(.*)$ ...
1
vote
0answers
25 views

How to have .htaccess inherit defines from httpd.conf

I defined a path variable in my httpd.conf: Define OOSPATH D:/oos This define can be used anywhere in the httpd.conf or files which are included from there. The same path needs to be used in a ...
1
vote
2answers
95 views

How to block website visitors from accessing image files?

SCENARIO I am hosting a website on an Apache server, where the images are saved on an img folder. I have already solved the issue of users accessing folders they are not intended to, placing some ...
3
votes
1answer
256 views

How can I highlight .htaccess code in Notepad++?

How can I highlight .htaccess code? I downloaded this XML file and I copy and pasted file content to userDefinedLanguage.xml inside my install directory. According to the documentation found here I ...
0
votes
1answer
264 views

Redirect all subdomains, subpages, and the root domain to themselves on another domain

I have done a lot of searching and have tried many things but I have still not managed to find a way of doing this exactly how I want it. Without having to make an Apache VirtualHost for each ...
0
votes
0answers
137 views

NGINX client cert authentication in Pydio

Let me explain my problem. I've a Pydio setup with NGINX as webserver.(https://github.com/kdelfour/pydio-docker) I've some client certs. They work. A part of my config (added part) looks like follow: ...
1
vote
1answer
62 views

Apache is requesting .htaccess from user directory which is parent dir to DocumentRoot

I have my website/blog in /home/tarach/www/tarach.net All files and directories starting from /home/tarach/www are to user: tarach, group: www-data ( apache httpd group ) I've setup virtualhost ...
1
vote
0answers
86 views

Make static site from wordpress site using bash

I have tried a few other scripts that can make a static version of a wordpress site but none of them are designed for bulk sites and I haven't found any that will just serve a static version while ...
0
votes
1answer
1k views

.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 ...
0
votes
1answer
255 views

Gzip compression on Apache using .htaccess

As per http://gtmetrix.com/enable-gzip-compression.html i'm trying to enable gzip compression on apache webserver adding code mentioned below in .htaccess, but it's not working ; can you please ...
2
votes
1answer
3k views

Proper Apache redirection from http to https

I set up a new virtual host for a new site on my server, but it's acting strangely despite having the exact same settings as my original site. I want all requests to be redirected to HTTPS, simply ...
1
vote
0answers
76 views

Chrome htaccess cache not enabled

When I go to an internal website using Chrome, I have to enter htaccess login credentials. However, in Firefox, when the htaccess login popup appears, the credentials are already filled in (obfuscated ...
1
vote
0answers
235 views

How to Use htaccess to disable SSLv3 and TLS1.0 on shared server

I operate a website on a shared hosting using apache server as the webserver. The operator refuses to disable SSL3 on the server because other customers on the shared server need it. Is there any way ...
0
votes
1answer
25 views

How to Test if site is accessible from certain browser version

using rules in .htaccess I am attempting to block access to sites hosted on my server from traffic using a specific browser version (firefox 27.0). Is there any way to test if I have .htaccess setup ...
0
votes
1answer
191 views

XAMPP Apache error AH01599: Cannot get media type from 'x-httpd-php53'

I'm trying to setup Xampp on a Mac (OSX 10.10.2), its setup and normal PHP runs, however when I try and run a Wordpress site the PHP code doesn't execute, it just prints out in the browser and I keep ...
0
votes
1answer
23 views

In SVN + Apache, how to password protect old revisions?

We have a svn repository, facaded by apache, and protected by (complex) authorizations. At revision 1000, we are migrating lots of folders in that svn to a new structure. We thus adapt the rights to ...
1
vote
0answers
243 views

mod_rewrite path info postfix and per-dir prrefix

There's an issue with .htaccess configuration. I just need the url /category to match the category.php script, but when I try to open this url, there's a 404 error instead. Here's my .htaccess: ...
0
votes
0answers
66 views

.htaccess in root directory

I have an apache webserver (shared hosting) where I have access to /home/user If I place a .htaccess in /home/user it gets applied to all subdirectories. The domain belonging to this has several ...
0
votes
1answer
191 views

How do regular expressions work in htaccess to redirect an IP range

I've been trying to redirect an IP range from one link to another. I can do it for a single 256 address block: RewriteEngine On RewriteBase / RewriteCond %{REMOTE_HOST} ^111\.111\.111\. RewriteCond ...
1
vote
1answer
647 views

Multiple htpasswd user entries [closed]

Using a Bitnami WordPress instance on AWS and the main issue I'm having is adding multiple users to my htpasswd file and have them authenticate to the site. Command : sudo apache2/bin/htpasswd ...
0
votes
1answer
89 views

Show The Same Content For Different URL Strings

I am trying to set up a system where for one of my directories, "example.com/folder/", if a user types in ".../folder/?(RANDOM STRING)", it will display the content for ".../folder/" but keep ...
5
votes
3answers
899 views

How do I block a host by ASN? Example - AS16276

There are a handful of especially toxic hosts out there. There is no reason we need to allow any of their IP's access to our servers. Is there a way we can block them using their ASN or other global ...
0
votes
0answers
166 views

The requested URL /fr/index.php was not found on this server Htaccess issus

I want to delete query string (fr) from my URI with htaccess rules, so I added this rule in the htacces file : RewriteRule ^((?!fr/).*)$ /fr/$1 [L,NC] But apache gives me this error: The requested ...
2
votes
2answers
9k views

Using .htaccess with IIS

It is necessary for me to make it possible for .htaccess files to be usable with IIS. Is there a way for this to be done? I know that on its own, IIS is not capable of handling this, but could I ...
1
vote
3answers
248 views

htaccess redirect to port

I need to redirect subdomain.example.com -> subdomain.example.com:32400/web My current htaccess is: Options -MultiViews +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ...
0
votes
0answers
55 views

What is wrong with my .htaccess 404 error

I have created .htaccess under my public_html folder and it is like this: ErrorDocument 404 /404.php if I type mydomain.com/random it shows the 404 error, however if I add anything else, like ...
0
votes
1answer
153 views

htaccess password dialog shown on home route

I created a droplet that has Wordpress installed on Digital Ocean. When I visit the homepage "/", I am required to input the .htaccess credentials in a dialog that shows up. I noticed this statement ...
1
vote
1answer
268 views

webserver serve file request with delay (htaccess)

I'm trying to figure out if it is possible to configure a webserver so that requests for files will be served with a delay. So for example if i were to serve this file ...
2
votes
0answers
92 views

Keeping Firefox from adding “.html” to url

I've been messing with .htaccess for a while, and have the following rule: RewriteRule ^(mypage|myotherpage)/?$ main.php?p=$1 [L,QSA] If I enter http://mydomain.com/mypage/, it displays main.php as ...
0
votes
1answer
263 views

Add a Trailing Slash to Single Url

Hi I Want to Add Trailing Slash to (/) only a Single URL The URL I want to add trailing slash is http://niresh12495.com/index.php so it would look like http://niresh12495.com/index.php/ any htaccess ...
0
votes
1answer
2k views

rewrite url in address bar without changing the actual url

Im facing SEO problem with my website cause my urls are with index.php for an example when i try to upload a file the url is like this 1 -http://niresh12495.com/index.php?app=downloads and when i ...
0
votes
1answer
954 views

remove the question mark from url using htaccess

i have tried to remove the index.php from url but the problem is I'm seeing an ugly question mark in the beginning of the url how can i get rid of it This is the code i have used in htaccess ...
2
votes
1answer
704 views

.htaccess Allow access not file by link only

I know that is possible to limit the access to a directory by the allow from ip.ip.ip.ip directive. But I've got a slightly(?) different problem: There is a directory, that contains pdf files only. I ...
1
vote
1answer
3k views

how to redirect a url with port via htaccess

Im Trying to Redirect a Single url like http://tracker.niresh.co:12495/announce to http://tracker.niresh.co/announce.php How can i get it working through htaccess ?
1
vote
2answers
165 views

Unhide all .htaccess files on mac

I am trying to unhide all the .htaccess files in my home folder. Below I've pasted what I'm using now, but it isn't working. find ~/ -iname ".htaccess" | xargs chflags nohidden "{}" Anyone knows ...
4
votes
0answers
300 views

why Safari always GET status 200, never 304 for my .swf file?

I serve a Flash app as a .swf file (with HTML wrapper file), and Safari always retrieves with GET status = 200, never 304. Thus, Safari never uses cache for this file and downloads it each time (it's ...
0
votes
3answers
9k views

MAMP .htaccess file not working

I'm looking for a while now how to enable .htaccess files in MAMP 2.1.2 I have the following settings: httpd.conf LoadModule rewrite_module modules/mod_rewrite.so ... # # DocumentRoot: The ...
0
votes
1answer
140 views

Redirect with .htacess - URL with regex to URL

I have a temporary need to redirect some installer files on my web site. The redirects that are working now look something like this: Redirect 302 /installer_1.0.0.zip ...
1
vote
2answers
1k views

.htaccess not working with SVN

I've got SVN setup on my home server, I'm trying to get htaccess working so I can password protect the /var/www/html/svn/repos folder where all my code is kept. The subversion.conf file looks like ...