Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
45 views

mod_rewrite index.php behind varnish server

I have on my pfSense router a Varnish server currently with 4 backends. 3 of the backends go to the same server on my network and the 4th goes to my development server I'm using to get some webapps ...
0
votes
1answer
247 views

HTTPS redirect, exclude subdomain - Opencart [duplicate]

I just switched to HTTPS on my server. Could you please help me with .htaccess to redirect all traffic to https://, exclude subdomains: www.example.com -> https://example.com example.com -> ...
1
vote
2answers
765 views

Permission denied: Could not open password file.

I am using Apache Red hat . I have .htaccess in my /var/www/html with permissions as followed -rwxr-xr-x. 1 apache apache 127 Dec 18 14:17 .htaccess .htaccess has following data set inside it ...
0
votes
0answers
143 views

Cross Origin Resource Sharing (CORS) Issue

I apologize in advance for no links - I am new to serverfault (Not StackOverflow), and don't have enough rep to post more than 2 links. We host our main Magento site on Nexcess at https//...
0
votes
1answer
164 views

How to Handle Routes of Two Laravel Projects on One Domain or Server?

I'm working on a project divided into two separate parts. Part one, the bigger part, is in Laravel 4.2. Part two, the shorter part, is in Laravel 5. Both are on the same server. My goal is to access ...
0
votes
1answer
45 views

htaccess - insert php script name into all URLs

I have an application which requires an htaccess file in the directory /tileserver/ that contains the following: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 ...
0
votes
2answers
47 views

Apache URL masking

I need to access http://www.domain.com/uri-path-to-resource.rsc in the browser, but to display the content from http://shop.domain.com/uri-path-to-resource.rsc. Unfortunately ProxyPass could not be ...
1
vote
1answer
116 views

HTTPS redirect in htaccess only when a query parameter is not equal to something

Background I've managed to get http to https redirection working for my Wordpress installation by including this snippet in my .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On ...
0
votes
1answer
24 views

Apache Authenication -http request failing in sub directories

I'm running an apachev2.2 server and I am using LDAP to authenticate the root directory. The authenication works well, however my page uses php which is using the file_puts_content function to grab ...
2
votes
1answer
28 views

Something like foreach in htaccesss?

I am in this situation: url: domain/var1/var2/var3/.../varn And I want to change that url in: url: domain?v1=var1&v2=var2&v3=var3/.../&vn=varn I found this way: RewriteRule domain/([...
0
votes
1answer
39 views

Apache Domain Redirect & Rewrite Query String

My Apache server will be receiving incoming requests from users in this format: http://192.168.1.182/SEARCH=searchstring&URL=http://test.com/blahblahblah I want to redirect users to another ...
0
votes
1answer
23 views

Dreamhost VPS Apache 2.2

This is a very unusual problem to begin with. Most people are having trouble with the .htaccess where they accidentally are denying permissions and want to fix that. I have the opposite problem. I ...
0
votes
0answers
17 views

.htaccess syntax RewriteEngine on

I'm learning to maintain my own WP site. After a lot of reading I ended up with my "complete" htaccess file that looks something like this DirectoryIndex index.php # Disable directory listings ...
0
votes
1answer
46 views

Is it possible to conditionally set php_value in .htaccess

I want to set php_value (error_log) based on the host server. If it is a local server: php_value error_log ./PHP_errors.log and if it is the remote server: php_value error_log /home/user_id/...
0
votes
0answers
22 views

Excluding a file from an IP block

I have recently converted a pre-2.4 configuration to Apache's new authorisation configuration but ran into a problem/misunderstanding concerning more than one RequireAll block. What I am basically ...
0
votes
0answers
22 views

RequireAll blocks overriding each other [duplicate]

I have recently converted a pre-2.4 configuration to Apache's new authorisation configuration but ran into a problem/misunderstanding concerning more than one RequireAll block. What I am basically ...
1
vote
0answers
13 views

How to provide read access to a folder and its files via htaccess

This is probably trivially easy but after RTFM'ing and trying several things I seem to be a bit stuck... The current version "appears" to let me access the directory BUT NOT the files via the browser....
1
vote
1answer
171 views

Wildcard subdomain redirect to folder without changing the url

So I got my htaccess file set up, it look like this: Options +FollowSymLinks RewriteEngine on RewriteBase / # MAGIC RewriteCond $1 !/$ RewriteCond $1 !\. RewriteRule ^(.+)$ /$1/ [R=301,L] # //...
1
vote
1answer
96 views

Disable https for a single file in apache

For a long time, I didn't use https on my linux server because I didn't find a decent CA that suits my needs. Now, Let's Encrypt (a new CA that provides free certificates) has launched their open beta ...
1
vote
1answer
92 views

apache httpd mod_expires does not work when deflate is on

On a Debian Jessie installation, I manually installed wordpress and edited .htaccess, turning mod_expires on: ExpiresActive On ExpiresDefault modification However, when I use Firefox Inspector to ...
0
votes
0answers
21 views

Strange bug with htaccess

I have a website installed on "/aaa/bbb/ccc/index.php". I created a file "/aaa/bbb/ccc/.htaccess" with only this content below and nothing else: RewriteEngine on After that I created a file "/aaa/...
2
votes
1answer
177 views

Laravel and Wordpress on same server/domain

I am trying to host a WordPress site inside a Laravel(5.1) project. I have the following structure (stripped down some) ├── app ├── config ├── public │   ├── index.php │   ├── wordpress -> ../...
0
votes
1answer
134 views

How to prevent opening /index.php or /index.html urls?

DirectoryIndex index.html index.php # -- INIT RewriteEngine on RewriteBase / # -- PRODUCTION # RewriteCond %{HTTP_HOST} ^www.assist\.loc$ [NC] # RewriteRule ^(.*)$ http://assist.loc/$1 [R=301,L] # -...
0
votes
2answers
45 views

.htaccess rule to 301 redirect /?my_foo=bar to /foo/bar/

I tried, unsuccessfully, for hours to build (what I think is) a simple 301 redirect in an htaccess file. My url looks like this: www.example.com/?my_foo=bar And I want it to 301 redirect to: www....
0
votes
0answers
23 views

Why is my redirect not working?

I have noticed a problem on a website that I manage. It is currently setup to redirect https://www.domainA.com to https://www.domainB.com This appears to be working but a similar redirect from http://...
0
votes
1answer
82 views

Apache's SetEnvIf to another variable in .htaccess

Is it possible using SetEnvIf to set a variable to the content of another variable? and if so, how? For example SetEnvIf defined_htaccess_var ^(.*)$ has_been_defined=%{defined_htaccess_var} So the ...
1
vote
1answer
60 views

.htaccess commands are case insensitive?

I see the same .htaccess code snippet written with two different ways as follows: <Files .htaccess> order allow,deny deny from all </Files> and <Files .htaccess> Order Allow,...
0
votes
2answers
78 views

htaccess protection of directory does not work any longer?

unfortunately the protection of my wp-login.php does not work any longer: <Files wp-login.php> AuthName "Forbidden access" Require ip 1xx.xxx.xx.x/24 </Files> This is apache's ...
0
votes
1answer
62 views

Force http on single page with site wide https is in place

On my website, I have one page that loads content in iframe form other sources and hence cannot have an http connection. I have an SSL installed and have a site wide https forced on all urls. I am ...
0
votes
0answers
26 views

problematic htaccess remapping of old domain urls to custom pages on new domain

I am remapping a bunch of urls from old domains to custom pages on the new domain, and a handful of rewrites for old urls don't seem to be applying. These are the rules i have now for the domain ...
-1
votes
1answer
97 views

how should i exclude certain .php URLs from being loaded through SSL?

recently i activated flexible SSL on my wordpress website,but i wish to load certain .php URLs through simple http, ones like: thankyou.php and contact.php ,and a few others, what code should i add to ...
0
votes
1answer
33 views

.htaccess Set custom variables

Is there a way to set custom variables inside my .htaccess files so I could use them later in my .htaccess code ? For example, I have a redirection to 2 different servers. Can I store the servers ...
2
votes
1answer
72 views

SuppressDescription Removes All Columns but the Name

I'm using mod_autoindex for some time with success (fancy index). However since I see no use for my "Description" column, I thought I'd remove it. According to the documentation, ...
1
vote
1answer
35 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 ...
1
vote
1answer
52 views

Apache rewrite rule to iis

I am trying to move site on apache to iis 8.5 All is ok, but 1 rule failes my site to run properly RewriteCond %{REQUEST_URI} !\.(js|css|jpg|jpeg|gif|png)$ [or] RewriteCond %{REQUEST_URI} apple-...
0
votes
1answer
17 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/(.*)$ http://%{...
1
vote
2answers
65 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
45 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 ...
3
votes
1answer
784 views

Htacess rewrite for AngularJs App

I need help regarding AngularJs application. I need htacess file for HTML5Mode in AngularJS and Hashbang fallback. Can someone help me? Cuz i get %2F when i use backslash. I've been folowing along ...
2
votes
1answer
97 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: http://www....
2
votes
2answers
48 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 mod_rewrite....
1
vote
1answer
51 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 /...
1
vote
2answers
267 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
1k 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
1answer
42 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 : <...
1
vote
0answers
11 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 400-...
0
votes
1answer
243 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 tool,...
0
votes
1answer
53 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
22 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 ....
0
votes
1answer
28 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" /&...