Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
1answer
23 views

manage ip access control through httpd php app with virtual_host configuration

Problem The system is allowing universal access to the php app 'owncloud'. That is, access is granted to servers across the network. As a test 'Require all denied' did not control access. What is ...
0
votes
1answer
64 views

PHP cache control

I have recently started some cache control on my website and it seems like some of the functions have stopped working because of this. My PHP content doesn't update anymore. In the Chrome network ...
0
votes
1answer
11 views

How do I prevent RewriteRules conflicting

I have three RewriteRules I am trying to implement but I cannot get all 3 to work together: RewriteRule ^products$ http://%{SERVER_NAME}/en_ca/products [L,R=301] RewriteRule ^products/(.*)$ ...
0
votes
2answers
2k views

.htaccess Authentication Internal Server Error 500

I am trying to setup an authentication for a directory on a ubuntu server and when i sign in i get a 500 Internal Server Error I have the following: AuthUserFile .htpasswd AuthName "Sign In" ...
1
vote
2answers
52 views

.htaccess deny/allow rules denying folder, but not direct to files

We have a .htaccess file in a folder configured with deny,allow as follows: Order deny,allow Deny from all Allow from <whitelist IP> Allow from <whitelist IP> .... There are no other ...
1
vote
0answers
34 views

Nginx htpasswd getting 403 after successful login

I want to access the folder /folder/subfolder/ in the webservers root (/var/www/dl.somewebsite.com/files/) with a password the rest should be public accessible. Using the script below I get a 403 ...
1
vote
1answer
22 views

Redirect page to 410 if match a specific Regex in .htacces

First time using .htaccess so I come here to have a bit of help since the web is not that file with informations (or I just don't find them :/). So the idea is that I want to redirect link ending by ...
2
votes
1answer
46 views

htaccess - redirect based on the request origin

Please help me out here. I would like to use .htaccess to redirect based on request origin, for example: User requests: http://www.domain.com/subfolder/ And should be redirected to: ...
1
vote
1answer
25 views

How to enable Apache DIGEST Authentivation everywhere on files and subdirectories

I'm trying many different configurations following many tutorials and documentations, I can't get the authentication without creating thousands .htaccess files. Here is my configuration : ...
2
votes
2answers
38 views

Can't redirect https for http

Some versions of Chrome automatically add https to my site addres. So I need to redirect https to http, because I don't have SSL certificate. I'm trying this, with no result: <IfModule ...
1
vote
2answers
102 views

block fake google bots [duplicate]

How could I block DDOS attacks with fake Google bots? I found 2 solutions on the net. But both seems to block also correct google bots. # Block fake google when it's not coming from their IP range's ...
0
votes
1answer
301 views

Apache: Request exceeded the limit of 10 internal redirects due to probable configuration error - WooCommerce

I have a woocommerce site. I have a recursive error in the Apache error.log: [Mon Nov 02 17:04:58.723578 2015] [core:error] [pid 2922] [client 172.31.12.207:19044] AH00124: Request exceeded the limit ...
1
vote
0answers
7 views

Turning off Hostnamelookup in shared hosting [closed]

I have a linux shared hosting account with cpanel for a drupal website. While optimizing the site (with the help of information from tools.pingdom.com), I found considerable waiting time of about ...
0
votes
1answer
39 views

How to replace %E2%80%8E with slash (/) using .htaccess?

Following image is my hosting directory, .htaccess locations and more explanation. Please kindly have a look. Image is here >>> my hosting and sites directories Problem: Somebody link to my blog and ...
0
votes
1answer
14 views

Load images from a different domain with htaccess?

Can I load images from a different domain with an htaccess file? So if my HTML as this: <img src="www.site.com/img" /> Can I make it be as if the HTML was: <img src="www.site2.com/img" ...
0
votes
1answer
18 views

Can i use one .htpasswd file for different folders on Linux server

I have many modules in my codeignitor application as module/products module/billing module/cms module/groups ..... Some of the above modules are accessible to admin user only so I want to put ...
-1
votes
2answers
18 views

Rewrite domain to cut its URI [duplicate]

I need to set up the domain.com/wp1/ to be shown like domain.com/ I have tried to set up any rewrite in the past hours, but no success :( P.S. There is a wordpress installed in the public_html/wp1, ...
-1
votes
1answer
24 views

RewriteRule running after Require test failed which rewrites 403.shtml to website content instead of error message

When a request gets denied due to require all denied, it first gets routed to the ErrorDocument 403.shtml but then that gets rewritten rather than stopping there and the site content actually gets ...
1
vote
0answers
12 views

Make Varnish check for html static before serving

I was thinking of writing some logics to my application so that it can write the static page content to s3 or some CDN and serve primarily from there. But am not sure if this is possible. For ...
0
votes
0answers
38 views

mod_rewrite hide URL params

I have the following URL: www.mydomain.com/musician.php?musician=musicianname&id=idnumber I am using mod_rewrite to achieve this: www.mydomain.com/musician/musicianname/idnumber This is the rule ...
1
vote
0answers
85 views

Nginx, redirect all resquest to single index.php file in subfolder

I'm trying to move my website from Apache to Nginx. My website is structured like this : www_root public other folders All requests are redirected from www_root to public folder with an ...
0
votes
4answers
779 views

point multiple domain to single web hosting account

point multiple domain to single web hosting account using htaccess i have used the following .htaccess file in my public_html directory RewriteEngine on RewriteCond %{HTTP_HOST} ^site1.org$ [OR] ...
3
votes
3answers
1k views

.htaccess per directory in nginx

I am new to nginx and I have been on apache before. In apache, each directory can have a .htaccess to target the directory and and it's subdirectories. Is this possible for nginx? If so, how do I do ...
0
votes
0answers
69 views

Convert .htaccess rule to the correct Nginx one

Good day, I've just installed a simple url shortener script on my website, unfortunately the author is not able to give me advice for Nginx since he wrote the script with Apache and mod_rewrite in ...
1
vote
0answers
69 views

Can I use nested <If> directives in .htaccess in Apache 2.4

I am trying to simulate the permalink structure of a previous version of my site using Redirect and RedirectMatch rules in my .htaccess file. I have different rules that I would to apply to different ...
9
votes
2answers
5k views

How do I get Apache2 to parse (without error) Header directives in a .htaccess?

I am getting pages loading with a 500 internal server error, due I believe to a directive that Apache has not been configured to allow. I have AllowOverride set to all, and a .htaccess file, ...
2
votes
1answer
32 views

How can I override the default Apache HTML directory?

Probably a simple one, but this has me confused. I'm running an EC2 instance which installs Apache 2.2 to the box once provisioned. I don't have access to a2enmod there but I need to change ...
0
votes
0answers
46 views

Apache Options +Includes is ignored

I have the main config file of Apache/2.4.17 (Unix) with: DocumentRoot "/usr/local/apache2/htdocs" <Directory "/usr/local/apache2/htdocs"> Options Indexes FollowSymLinks AllowOverride ...
1
vote
5answers
18k views

Redirect all http AND https non-www URLS to https://www.example.com via htaccess

For reasons much too long and complex to get into (it involves several layers of corporate red tape resulting in someone else not purchasing a wildcard SSL certificate I requested), I have to set up a ...
1
vote
2answers
6k views

How to enable `Keep Alive` in a shared hosting environment?

I have only acces to the php.ini file and my good old .htaccess file. Where do I enable the Keep Alive setting? ( Im on a plesk 8.2 )
0
votes
0answers
23 views

Apache htaccess precedence

I am wondering about the order of precedence within an htaccess file. I have a RedirectMatch outside of any block that is being over-ruled by a FilesMatch directive later in the file. How can I ...
0
votes
1answer
120 views

Can I use Gulp to modify my .htaccess file with different configurations for Dev & Production?

I have two CentOS boxes running Apache. One is my dev environment and the other is my production environment. I am looking at using Gulp in a process of pushing from my dev server to my production ...
0
votes
1answer
28 views

System error in Apache with combination of https redirection plus password requirement plus error document

In an Apache 2 vhost I have the following configuration (in my case, in .htaccess of the document root (which is for simplicity the same for http:80 and https:443) RewriteEngine On RewriteCond ...
-2
votes
1answer
68 views

How to rewrite URL by removing the last two characters within the htaccess file?

How to rewrite a URL by removing the last two characters within the .htaccess like following? /blog/?m=20150218 rewrite to /blog/?m=201502 I have tried for following but not working: RewriteCond ...
0
votes
1answer
13 views

.htaccess not behaving as desired

Eventhough I'm new at htaccess, I've been learning a lot in the past few days, but I'm stuck on a certain part that resulted in the website not behaving as desired. Here is the part of the code where ...
1
vote
1answer
29 views

.htaccess redirect only for homepage?

My website has more languages and I want to do this redirect for every languages for example: /es/ to /es, simple with Redirect but this method make problems for subpages, how can I tell htaccess to ...
-2
votes
1answer
68 views

(Amazon AWS) How to redirect an old domain to a new one-While not having any server for the old domain anymore (so I cant redirect it using .htaccess) [closed]

I had this website: www.example.pro and now I created a new website using Amazon AWS, and bought a new domain: www.example.com. I defined everything on Route 53 on Amazon. Everything works perfect ...
1
vote
0answers
44 views

Using Apache mod_rewrite to rewrite host to subfolder, but it redirects instead of rewrite

I want to simulate virtual hosts by .htaccess, so I want to rewrite hostname to subfolder. It works, but on some URLs it don't rewrite but redirects. This is my .htacess file: RewriteEngine on ...
0
votes
1answer
10k views

AH01630: client denied by server configuration Apache

I get this error when trying to access localhost via a browser. 403 Forbidden I use Ubuntu 14.04 LTS Here is my configuration file: etc/apache2.conf # This is the main Apache server ...
1
vote
1answer
38 views

Is it possible to limit connections per “user agent” in htaccess?

Say my goal is to limit the number of users visiting my site concurrently via "Mozilla" (firefox) user agent, is it possible to do in apache 2.2? I'm thinking using something along the lines of: ...
2
votes
4answers
4k views

AuthUserFile path relative to virtual host root?

Given this folder / file structure: private/.htpasswd public/.htaccess ... where public is the root folder of a virtual host in Apache, and private is its sibling folder: How do I define a ...
-1
votes
1answer
76 views

Is there any way to make Nginx use .htaccess files?

I know .htaccess files are very detrimental Apache's performance and are avoided by Nginx because they are considered "doing it wrong." Unfortunately I have to support a massive web app that is built ...
0
votes
1answer
53 views

VirtualHost/htacess : how to point a subdomain to an url parameter?

I must to create a multi-languages website. In order to achieve this aim, I want to point subdomain representing a language to the 1rst url parameter (GET variable) of the domain in my virtualhost ...
0
votes
0answers
13 views

Forcing HTTPS across site is intermittent

I've a Wordpress site on my server. Within it's root directory I've got my htaccess file. Within this file I've the following lines of code: #Begin https redirect RewriteCond %{HTTPS} off RewriteRule ...
0
votes
0answers
37 views

protect a wordpress url with .htaccess password method

I have a WordPress site, where I want to restrict user access for certain URLs (i.e site.com/training/private and all the URLs that follows /private/) through .htacces method I have used the below ...
1
vote
1answer
547 views

How to rewrite using htaccess if the file exists in another folder?

We are trying to rewrite to another folder if the file does not exist in the document root, but does exist in the other folder. The other folder is in a completely different location, which is ...
1
vote
1answer
112 views

Exclusion of a protected sub-url does not work on Apache 2.4?

I try to exclude a sub-url "/shop/api" from my protected website. It worked fine on different server on Apache/2.2.15 but now not with Apache/2.4.7? It always asks for the basic authentication. Any ...
-1
votes
1answer
56 views

I can't prepend HTTP://WWW to the URL when I redirect to the same domain

There is this WordPress application on OpenShift that uses CloudFlare as DNS server. OpenShift gives us a URL such as app-user.rhcloud.com and allow you to add alias. Such as www.website.comand ...
0
votes
0answers
135 views

Redirect my main domain to https using .htaccess, not sub domains

My main site needs to 301 redirect to https but I have other sites housed in that folder. They work fine as http but if I need to redirect a parked domain to that sub-site it attempts to force https. ...
-1
votes
1answer
34 views

Mod rewrite regex htaccess

I've been using mod_rewrite in order to block some user agents but now, I'm getting an 500 Error and error_log: /var/www/htdocs/.htaccess: RewriteCond: cannot compile regular expression I think ...