Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
30 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
69 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
33 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
50 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} ...
0
votes
1answer
15 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/(.*)$ ...
1
vote
2answers
63 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
42 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
592 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
83 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: ...
2
votes
2answers
45 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
1answer
39 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
196 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
817 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
36 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 ...
0
votes
1answer
164 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
49 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
21 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
24 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" ...
-1
votes
2answers
23 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
vote
0answers
20 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
57 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
122 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 ...
-1
votes
1answer
32 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
1answer
117 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 ...
0
votes
0answers
87 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 ...
2
votes
1answer
35 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
97 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
1answer
97 views

Can't get included CSS and JS files to be compressed

I have enabled compression via .htaccess and in httpd.conf However when I run it through the various online testers, its always saying that various included files are not compressed. Apache version ...
0
votes
0answers
26 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
281 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
16 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 ...
2
votes
2answers
187 views

Special characters in URL causes custom redirect to fail

I have a domain on which I am trying to set custom redirects for the error pages. My .htaccess file looks like so: RewriteEngine On AddDefaultCharset UTF-8 DefaultLanguage en-US # disable TRACK and ...
-2
votes
1answer
124 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 ...
1
vote
1answer
46 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 ...
0
votes
1answer
44 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 ...
1
vote
1answer
51 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: ...
-1
votes
1answer
97 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
97 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
14 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
45 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
244 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
81 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
201 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. ...
0
votes
0answers
133 views

Prerender with my angular application

ive asked this question on Stackoverflow and got suggested to try here so i am hoping some of you can help: I have followed the following guide: In angular: $locationProvider.html5Mode(true); In ...
-1
votes
1answer
45 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 ...
0
votes
0answers
18 views

Direct two web pages to https while maintaining the rest in http

I am successfully directing my profile page to https while keeping the rest in http. I am having trouble adding another page to be directed to https without causing an infinite loop. The page I am ...
0
votes
1answer
98 views

Redirect to Maintenance file with .htaccess

i'am trying to do a simple redirect to a maintenance page, but seems like apache won't let me do ! i have a folder for 3 version of a wiki (each with a specific language), so i want to redirect each ...
1
vote
0answers
55 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
0answers
27 views

SSL Subdomain redirects to servers IP Address [duplicate]

I have a server with Apache installed under FreeBSD. I have enabled rewrite rule and applied it to .htaccess (can be seen below); Ref: http://stackoverflow.com/questions/9985735/redirect-ip-to-domain ...