Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
72 views

htaccess redirect affects bingbot, returning Redirection limit reached

Inside my .htaccess file, I have the following script: RewriteEngine on RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] <IfModule mod_rewrite.c> ...
1
vote
1answer
42 views

Apache: ExpiresByType per directory?

I have a folder with javascript files that should expire faster than the normal scripts. Is it possible to let files expire per directory using Apache 2 other than .htaccess? <IfModule ...
1
vote
0answers
52 views

Limit file access/download by count in Apache

I'd like to limit the number of times a file/image can downloaded/viewed to an upper count. For example if I have an image called /Limited.jpg and I wish that it can be downloaded/viewed only 1500 ...
0
votes
0answers
15 views

htaccess works fine on local but differently on remote

Hi I have an htaccess working fine on my local machine but when i upload it to my remote machine it works differently. RewriteEngine on RewriteCond %{REQUEST_URI} ...
0
votes
1answer
94 views

Apache Tomcat directory access, restricted and accessible only by web application

I have a Grails app. I want to move out all the images users upload to a directory outside of my web-app directory, somewhere else on the disk. Then I want to allow my application to serve them on ...
2
votes
2answers
6k views

Convert and redirect URL in uppercase to lowercase using .htaccess

I would like redirect a URL with uppercase characters http://localhost/A/B to a lowercase version http://localhost/a/b using the .htaccess file. Using regex I can capture A and B but is it possible ...
0
votes
1answer
24 views

Rewrite a directory to another directory without a redirect [duplicate]

I have the following rewrite rule: RewriteRule ^support/(.*)$ /blog/support/$1 [R=301,NC,L] However, all it does is a simple redirect. What I want to is for /support to show the contents of ...
0
votes
0answers
34 views

Enable gzip for source maps

I'm using the Grunt plugins to concat, minify and generate source maps of my Javascript before I push it to the production server (I'll soon be doing the same with SASS for CSS). The source maps ...
0
votes
0answers
47 views

How to convert this .htaccess to Lighttpd?

I converted .htaccess below to Lighttpd but it doesn't work. What mistake did I make? You can find original .htaccess below, and the file I converted below it. Original .htaccess: RewriteEngine On ...
2
votes
1answer
59 views

I'm getting 500s while LIMIT / block http POST request w/ Apache(

I'm trying to use core - Apache HTTP Server's <LIMIT> Directive to limit spamers from doing POST's to my website(s): <Limit POST> Order deny,allow Include ...
0
votes
0answers
83 views

redmine in subfolder issue (Apache, mod_passenger, Ruby + Drupal site in main folder)

I have Redmine in subfolder /var/www/redmine and Drupal in folder /var/www/ When I go to URL mysite.com/redmine, Redmine shows ok, but mysite.com/redmine/login is (over)handled by Drupal. Apache ...
1
vote
4answers
86 views

HTTPS / HTTP mod_rewrite rules, strange interaction with subsequent CMS index.php rewrite

With the below rewrites in htaccess, as expected, this HTTPS request is not rewritten: https://example.com/system/anything is not re-written to http://example.com/system/anything But, ...
-1
votes
2answers
128 views

Apache .htaccess error: 'not allowed here' on Debian Wheezy

I am trying to configure an apache virtualhost which needs to be password protected in the root directory. So I created a .htpasswd file (with sha passwords) and configured the .htaccess file. ...
0
votes
1answer
57 views

Rewrite not working in htaccess (apache2.2.22, windows server 2012)

I'm sure that my .htaccess file is being read by Apache as I tried to write in random stuff in it, eg: "sifnoweijf", and my page could no longer be displayed. but why the following rewrite doesn't ...
2
votes
1answer
102 views

.htaccess not working on Cent Os 6.4

I have installed Cent Os 6.4 -Final Version and set the environment for PHP web development. My application uses the .htaccess for url rewrite & denying direct access of files. my configuration ...
1
vote
1answer
259 views

Failed PCI compliance - 403 (Forbidden)

Due to a recent upgrade in the scanning done by our PCI compliance testers, we recently failed a PCI, and the suggested solution is as follows: Configure the HTTP server to specify the same error ...
0
votes
1answer
48 views

Order that Apache handles .htaccess directives

I was working on a WordPress site yesterday, mostly in a Web Performance Optimization capacity (on shared hosting). At one point I noticed that my .htaccess file had redundant, possibly ...
3
votes
4answers
984 views

Why do .htaccess redirects work in http but not with https?

I have a simple .htaccess file that works great on the http version of the site but not when I go to https. Why? RewriteEngine on #This is so if the file exists then use the file RewriteCond ...
0
votes
1answer
42 views

Redirect specific IP using htaccess [duplicate]

I am trying to figure out if it is possible to do a 301 redirect for a particular IP address (in this case brute force password bot). I want to send this guy to a project honeypot link rather than ...
1
vote
1answer
28 views

Apache server password file (htpasswd) encoding

I use .htaccess, basic authentication and a corresponding password file to secure my web-space. The hosting is Linux / Apache. I want to support a user name with French accents (ie. not ASCII). ...
1
vote
1answer
51 views

Force HTTPS w/ Load Balancer and without (.htaccess rewrite)

I have the following code as a rewrite rule. RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L] This ...
1
vote
2answers
71 views

Apache2 mod_rewrite failing for non-existent sub directories [duplicate]

An even shorter version of my .htaccess file (Last RewriteCond wasn't there) use to work perfectly on my shared web hosting but I've moved to a VPS with Ubuntu 12 with it's stock Apache2 but it simply ...
0
votes
1answer
26 views

Authentication just for HTTPS Requests in Apache

I configure the authentication for my webspace via a .htaccess file (I have no control over the httpd.conf file). For a secure implementation I have an automatic redirection of HTTP to HTTPS via ...
1
vote
2answers
127 views

Amazon EC2 .htaccess and 500 Error

I have an Amazon EC2 (amzn-ami-pv-2013.09.0.x86_64-ebs (ami-149f7863)) on which I installed Apache, PHP and MySQL. All works fine until I try to activate .htaccess. I change AllOverride All in ...
0
votes
2answers
759 views

How to add iptables ip blocklists to Plesk 10.4.4 (CentOS)?

I'm trying to figure out the best way to add IP blocklists to my Plesk 10.4.4 server (CentOS). It's a simple Virtual Server I recently acquired through my hosting company. I've used .htaccess files ...
-1
votes
1answer
35 views

How do I redirect al url request using htaccess when I already have rewrite rules?

I've tried everything but simply can't get this to work. This is the default Wordpress redirect code that sits in my htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ...
1
vote
0answers
36 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 ...
0
votes
1answer
53 views

Need Corrected htaccess File

I'm attempting to use a wordpress plugin called WP Fast Cache which creates static html files from all your posts, pages and categories. It creates the following directory structure inside ...
0
votes
1answer
148 views

serving static file from cookieless domain: alternative cookieless directory

I'm trying to follow all the guidelines of "Google Page Speed​​". The directive "Minimize request overhead" requires static content (images, js, css, etc.) on a static server (ie cookieless): ...
0
votes
1answer
151 views

Denying access to website via htaccess based on http header

I've been trying for ages to get this to work and I can't put my finger on it. What I'm trying to do is block access to a site from a number of countries, based on the CF-IPCountry header added by ...
0
votes
3answers
219 views

htaccess filesMatch exclusion

I have the following directive in my htaccess <filesMatch "\.(gif|jpe?g|png|js|css|swf|php|ico|txt|pdf|xml|html?)$"> FileETag None <ifModule mod_headers.c> Header unset ...
0
votes
1answer
336 views

Compress with Gzip or Deflate my CSS & JS files [closed]

i ve a fashion website & using wordpress. I want to Compress or Gzip or Deflate my CSS & JS files. i have tried many codes with .htaccess to compress but not working. Would any body help me ...
2
votes
1answer
829 views

htaccess: how to rewrite to clean urls and redirect old urls to the new clean ones? [duplicate]

With htaccess I'm trying to make my sites urls clean. I use very basic urls like: www.mysite.com/pagename.php ("pagename" is variable). I want www.mysite.com/pagename to display the content of ...
0
votes
1answer
106 views

Cache Busting and Include Files for Nginx

In Apache you can use the following to cache bust css and js files and server them as a single file with Apache's Include mod: <FilesMatch "\.combined\.js$"> Options +Includes ...
0
votes
1answer
65 views

.htaccess rewrite rule to ignore a directory

I am running a Symphony installation out of the directory symphony but I want to remove that word from the URL in specific cases. When a user visits http://domain.com/demo It should go to ...
0
votes
1answer
42 views

.htaccess - permissions forbidden

I have an error with a new virtual host that I can't figure out.. My .htaccess doesn't have web access (403). [Thu Oct 31 17:51:01 2013] [crit] [client ] (13)Permission denied: /srv/data_disk/www ...
0
votes
3answers
110 views

How do I redirect my website from non-www to WWW using Apache2? [closed]

I'm currently trying to set up my personal webpage. I am using a VPS and have manually installed Wordpress, and everything seems to work... except if I go to the non-www version of my website, it ...
5
votes
1answer
86 views

How to minimise effect of mischievous, persistent POST requests

For a few months now one of our shared hosting servers has been persistently and constantly hammered by "POST /" requests from what must be hundreds of thousands of individual IPs. On a number of ...
0
votes
2answers
31 views

301 redirect from non www to www issue

I have been trying to set a 301 redirect from a non www to a www domain since yesterday but it only cause problems on my site. I first tried it from the control panel of the website, then by modifying ...
0
votes
1answer
65 views

.htaccess redirect root directory and subpages with parameters

I am having difficulty trying to redirect a root directory while at the same time redirect pages in a sub directory to a different URL. For example: http://test.example.com/olddir/sub/page.php?v=one ...
1
vote
1answer
63 views

Add separate domain name to Wordpress admin area with htaccess

I have a Wordpress installation in a seperate folder on my server (meaning it is not in the root folder). Let's call that folder "folder A". I have a htaccess rewrite rule that maps Domain A to folder ...
0
votes
1answer
53 views

Accessing Apache virtual host on my local machine

I use dyndsn.org and port forwarding to manage access of my local Apache webserver from the Internet. It access my apache htdocs via http://myusername.dyndns.org/somesite. However, I have set an ...
0
votes
1answer
36 views

Apache .htaccess rewrite php to js and execute js file as php script

I have the folowing rewrite rule in my .htaccess file RewriteRule ^js_([A-Za-z0-9\.\_\-]{1,50})\.php$ libjs/misc/$1.js so js_messages.php url links to libjs/misc/messages.js file It's working ...
0
votes
1answer
48 views

htaccess rewrite condition old site to new site with querystring

I am not even going to pretend to fully understand how htaccess rewrite conditions work. I've been working on this for a while searching and searching. I have an old Wordpress site www.old-site.com ...
0
votes
0answers
28 views

vhost httpdconf and htaccess not working as it should

I have been struggling for several days now with a mobile redirect and cant get it working. In my vhost I have created a subdomain folder (m) for the mobile version of the website In the root I have ...
1
vote
1answer
195 views

.htaccess - Simulating virtual host wrong link to Parent Directory in Directory Listing

I have a domain dedicated for my local server (.dev), and an .htaccess file which redirects requests like http://folder.dev/subfolder/ to /htdocs/folder/subfolder. It works great and all, except for ...
1
vote
1answer
112 views

How multiple <Directory> sections work in Apache configuration (httpd.conf)?

For example, if my '/etc/apache2/httpd.conf' looks like this: <Directory /> AllowOverride None </Directory> <Directory /home> AllowOverride FileInfo </Directory> ...
0
votes
1answer
58 views

Nginx complete folder protection not working

I have installed nginx(1.4.3) with PHP-FPM(5.4.20). i want to protect my wordpress wp-admin folder. my nginx configuration file domain.conf: server { listen 80; server_name example.com; ...
1
vote
2answers
213 views

Blocking bad bots

I found this script and was wondering if this is just overkill and even worth using? Is it better for me to just use mod_security? # Generated using http://solidshellsecurity.com services # Begin ...
0
votes
1answer
28 views

htaccess parameter to subdomain

I would like to redirect this http://www.domain.com/test.php?sub=subdomain&type=cars redirects to http://subdomain.domain.com/cars I already have mod_rewrite rules to do the opposite: ...