Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
24 views

outlook trying to access image through webdav in email signature

I have an html email signature and 1 image on it which is hosted online. In Outlook 2010 it tries to get this through webdav which at atimes to users can take a while, once it fails then it gets it ...
0
votes
2answers
69 views

Redirect loop when forcing HTTPS

I am using the following to force HTTPS on my main website. ### Force SSL RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] If you want to view the full htaccess ...
-1
votes
0answers
12 views

How to show two categories before title in url using .htaccess [duplicate]

In my .htaccess file i am using this line given below to show url like this (http://localhost/mysite/top-5-home-business-in-the-world). "top-5-home-business-in-the-world" is the title. RewriteRule ...
-1
votes
1answer
112 views

Blocking request with query string

I'm an under a DDoS attack though I have cloud flare.. I found out that the attacker is accessing the server using query strings "?a=randomnumber" I don't use query strings in my website so I need ...
2
votes
1answer
28 views

Apache - protect a subdirectory but not the root

I have a website, it should be accessible by anyone, but one directory should request http authorization. I have added following lines to website.conf: <Directory ...
0
votes
1answer
72 views

why apache returns error message in body while returning 200 status code

I've configured Apache to return 200 on all requests that made with OPTIONS verb: RewriteCond %{REQUEST_METHOD} OPTIONS RewriteRule ^(.*)$ $1 [R=200,L] The Apache indeed returns status 200 OK, yet ...
0
votes
1answer
65 views

why Apache's setEnvIf doesn't set correct header and how to debug it

I have the following in my .htaccess file: <IfModule mod_headers.c> SetEnvIf Origin "http(s)?:\/\/(www\.)?(inreado\.local|testenv\.inreado\.com|inreado\.com)$" AccessControlAllowOrigin=$0$1 ...
0
votes
1answer
31 views

Setting Expires Headers for Things Retrieved Via Query String

I have an installation of MediaWiki and have been optimizing various aspects using Google's PageSpeed tool as a guide, and I've so far been able to make lots of improvements. One thing I'm not able ...
1
vote
1answer
29 views

Specify which directores to look for .htaccess file

I'd read that enabling .htaccess for all directories causes a performance overhead, because all subfolders are also scanned for .htaccess files. I'd like to only have the .htaccess file read in: ...
3
votes
3answers
1k views

Configuring htaccess/mod_rewrite to serve static files with question mark in the URL

I've just taken on hosting of an ancient site that was converted from asp to static html, consisting of about 6,000 files. However, my server doesn't like the filenames, giving a 404 error. The URLs ...
0
votes
0answers
27 views

Rewriting .htaccess for https on subdomain

I'm currently hosting subdomain dev.example.com from a dev subfolder and using this .htaccess rules: RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?dev.example.com$ RewriteCond %{REQUEST_URI} ...
-1
votes
1answer
39 views

Do incoming https posts require https URL's

We would like to have HTTP posts from secure servers be secure on our end. Do the posts need to be made to https://ourserver.com, or does it work to post to http://ourserver.com, and then redirect to ...
0
votes
3answers
1k views

How to insert an “index.php” into every url using .htaccess?

Example: My Site gets called like that: www.example.com/controller/method/parameter1/parameter2 Now, .htaccess needs to rewrite this URL into: ...
-1
votes
2answers
66 views

301 redirect help needed for urls with parameters

How do I 301 redirect all urls such as http://domain.com/languages/italian/itemlist.feed?start=[0-9]&format=feed http://domain.com/languages/italian/itemlist.feed?format=feed&type=rss to ...
0
votes
0answers
15 views

Disable gd library on a specific website

I am trying to disable gb library on a specific website so it won't affect the other websites which are hosted on the same server. Is it possible to do this with htaccess or is there another way?
8
votes
2answers
3k views

SSL redirect on EC2 instance behind SSL terminating load balancer

I'm trying to redirect all url's to https in a web application. I have an ec2 instance behind an elastic load balancer. SSL is terminated on the load balancer. Any attempts at redirection end up ...
7
votes
2answers
2k views

Bypassing htaccess restrictions?

I found this in my apache access logs access.log:555.555.555.555 - - [05/May/2011:12:12:21 -0400] "GET /somedir/ HTTP/1.1" 403 291 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 ...
0
votes
0answers
10 views

Apache mod_rewrite with proxy to HTTPS from HTTPS host

I am trying to use the mod_proxy to rewrite internal one URL to another in this way: RewriteCond %{HTTP_HOST} ^www\.domain\.de$ RewriteCond %{SERVER_PORT} ^443 RewriteRule ^blog/(.*)$ ...
0
votes
0answers
7 views

htaccess rewrite rule for subdomain results to redirect loop [duplicate]

Below is my htaccess config: RewriteEngine On # if the domain starts with "apply." # i.e. apply.example.com # redirect to application URI RewriteCond %{HTTP_HOST} ^apply\. [NC] RewriteRule ...
0
votes
2answers
34 views

Setting htaccess rule for nginx

Hi i m having issue while setting htaccess rule in nginx. My htaccess is : htaccess rules are: RewriteEngine ON RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* ...
1
vote
1answer
34 views

Apache .htaccess - how to rewrite referrer?

I have a site www.example.com. I would like to achieve the following: All the visits that click on www.example.com from my other site www.example.net, to have the referrer www.example.org. In other ...
0
votes
1answer
677 views

Conditional Directory Index In Htaccess

This relates to the question in: http://stackoverflow.com/questions/1599717/conditional-directoryindex-in-htaccess The answer states that the following should work: SetEnvIf Remote_Addr ...
0
votes
1answer
646 views

.htaccess to PayPal & PayPal Sandbox

For testing on my pre-live site, I'd like to allow only my own IPs and PayPal Sandbox. For production, I'd like to allow only PayPal to my IPN listener. I can restrict in .htaccess to my IPs, but ...
0
votes
2answers
1k views

htaccess exception / “deny from all except Paypal”

I spent my evening on this problem and I did not find how to solve/bypass it :-( I have in "mydomain.com/admin/" a .htaccess file with the following : <Files ~ "[^index]\.php$"> Order ...
0
votes
1answer
57 views

Mod_rewrite Underscores to Dashes (or Hyphens) in Opencart

I'm transferring an e-commerce site to a new shopping basket. For some reason the old site used dashes for categories but underscores for products. So the full url of a product looks like this: ...
1
vote
1answer
959 views

How to hide cPanel directory [closed]

I have a server that uses cPanel. There is a built-in feature with cPanel where I can access the login area by going to domain.com/cpanel. I was wondering if there was a way to disable it or hide ...
2
votes
1answer
1k views

Hide cPanel login page? [closed]

I use the url http://example.org/cpanel to log in. This is accessible to anyone which seems like a bad idea as anyone can guess it's there. How can I hide it and make it accessible via .htaccess ...
3
votes
1answer
861 views

How to exclude IP from htaccess domain redirect [duplicate]

I'm trying to write a custom redirect rule for some testing purposes on 2 domains with exactly same site. The code I am using is: RewriteEngine on RewriteCond %{REMOTE_ADDR} !^1\.2\.3\.4$ ...
8
votes
2answers
16k views

Configuring favicon with expires header in htaccess

I have implemented Expires headers via mod_expires on my Apache server and have successfully created expires headers for most file types, however I am having trouble with the favicon. I initially ...
0
votes
2answers
48 views

Apache not allowing .htaccess

I upgraded my Ubuntu to 14.04 LTS and Apache to 2.4. When the server first started back up I was getting 403 errors visiting pages. This is when I learned I needed to change to Require all granted. I ...
2
votes
8answers
10k views

Excluding a directory from a root .htaccess rewrite rule to allow it to be password protected?

I have spent a tremendous amount of time the last week trying to figure this out, but no matter what I try I cannot get this to work. My web host said they did not have anyone who knew enough about ...
-1
votes
1answer
27 views

Apache: deny acces to directory but allow 1 file

I am using Apache 2.2.22 on Ubuntu 12.04. I need to disable access to directory /var/www/abc/ but allow access to file inside this directory /var/www/abc/README.txt. I try: <Directory ...
0
votes
1answer
40 views

PHP scripts fail after adding .htaccess to password protect a dir

I added .htaccess and .htpasswd to a dir in order to password protect it. That part works. AuthType Basic AuthName "Password Protected Area" AuthUserFile /path/.htpasswd Require valid-user But ...
0
votes
0answers
73 views

Avoid redirect loop using htaccess or php

I have searched for my specific problem using google and your sites search engine, but found nothing similar to my task. I am rewriting via htaccess internally to point to the specific site content. ...
-1
votes
1answer
40 views

.htaccess rewrite rule, extract number to query variable [duplicate]

I'm migrating a huge site from an old proprietary CMS to WordPress and need to redirect the old URL structure. The old system has all kinds of whacky URLs, but the one thing common to them all is ...
0
votes
2answers
2k views

.htaccess file causes “500 Internal Server Error” but no error log entry

I set up an apache manually and added a second web directory with this code: Alias /webs c:\webs <Directory /webs> AllowOverride All </Directory> However, this web has an .htaccess ...
1
vote
1answer
70 views

.htaccess query string blocking phpmyadmin [closed]

After phpmyadmin login, I get this error message Error in Processing Request Error: 403 Error text: Forbidden" I found that removing the following lines from .htaccess it doesn't give any error ...
0
votes
0answers
53 views

how to serve a single page application with openshift

I'm tryng to deploy a single page app on openshift. On openshift all the static contents have to be in wsgi/static dir, but I obviously want to serve my static index.html from the root. Every attempts ...
0
votes
0answers
6 views

RESTful Webservice: .htaccess linking to higher level hierarchy [duplicate]

I have this RewriteRule for apache: RewriteRule ^locations/([0-9]{1,})$ index.php?id=$1 It is positioned in public.www/medmec-api/.htaccess and the rule does work for ...
0
votes
0answers
67 views

Dynamic Subdomain with htaccess unchanged URL

I have a Codeigniter project Located at "domain.com/users/abc" directory. I want to access it with Subdomain "abc.domain.com/" and also I don't want the url in the address bar to change. There will ...
0
votes
0answers
17 views

Openshift wordpress non www to www redirect via .htaccess [duplicate]

I am running wordpress on openshift, i want to make non www to www redirect. I have read this answer. I have added .htaccess file into .openshift/config directory. My .htaccess contains following ...
3
votes
2answers
2k views

Does is matter in what order rules are placed in htaccess?

I hope this is a simple YES or NO answer (please specify why) Q1: Does is matter in what order the rules are placed in htaccess? Since they are completely separated items: for example Q2: If yes, am ...
1
vote
1answer
98 views

.htaccess recommendations to prepare for new launch of website - caching

Currently my website has cache controls set for javascript libraries and images, and caches them for one week. I'd like to know what best practices I should following leading up to my websites ...
-1
votes
1answer
45 views

Recommended sequence for directives in htaccess?

Thanks in advance for comments and suggestions. My wordpress site was hacked so I deleted it and started from scratch beginning with a proper htaccess document. As I was configuring the htaccess ...
1
vote
2answers
97 views

htaccess problem

I have a few lines in my .htacess Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^mydomain.org [NC] RewriteRule ^(.*)$ http://www.mydomain.org/$1 [L,R=301] # index.php to / ...
5
votes
4answers
3k views

Returning 404 code for unauthorized attempts

I have an admin directory on my web server (http://test.com/admin) and I don't want unauthorized parties to access this /admin/ directory instead I want to return 404 error code for all unauthorized ...
0
votes
0answers
10 views

htaccess to redirect blog but not attachments

I have a wordpress blog which moved from the directory /blog to the root directory. I would like to redirect the entire directory to the new blog which is now /category/blog The problem is that ...
1
vote
4answers
1k views

apache 2.4, mod_proxy_fcgi not honouring .htaccess, work around needed

I am using apache 2.4.7 with mod_proxy_fcgi for purpose of passing through php to php-fpm (this will be used for shared hosting environment). The htaccess works fine for non php files, but once it hit ...
0
votes
0answers
59 views

mod_rewrite path info postfix and per-dir prefix

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: ...
-1
votes
1answer
34 views

New domain and HTTPS redirects [duplicate]

I have a domain.co and just bought domain.com and want to use SSL on it. Having in mind this H5BP apache config for HTTP to HTTPS redirect: <IfModule mod_rewrite.c> RewriteEngine On ...