Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
2answers
23 views

Apache access control not behaving as expected

I have a static HTML website that being served by Apache 2.4 using SSI. I have been using basic authentication to control access to a subset of files and it has stopped behaving as expected. ...
1
vote
1answer
652 views

Apache SSL redirect loop [duplicate]

We are trying to redirect our site from http to https only. Everything we have tried in .htaccess has resulted in a redirect loop. If we manually type the "https://" in front of the url, our page ...
0
votes
1answer
1k views

Apache .htaccess with mod_expires not working for certain directories

I have a Joomla site that I am trying to enable caching using mod_expires. I have the .htaccess in the root of the site and have added the options as found on the page ...
0
votes
1answer
74 views

how to remove .php extension using htaccess on godaddy linux hosting

How to remove .php extension using htaccess file. I have tried many codes (which I found on internet but not got success. An Internal server error is regularly showing. I am using Godaddy Linux ...
0
votes
2answers
932 views

Server, Database or Code Issue? Magento backend rewrites itself with a index.php which doesnt work

I will be honest and admit my cross posting in magento.stackexchange.com but the reason is that I believe it is a server fault, and now I am looking for proof to present to my dreaded hosting ...
0
votes
1answer
16 views

Redirect all vhosts when a certain condition is true

I am trying to redirect all vhosts to a certain url based on the REQUEST_URI. For example if somebody makes a request to www.something.com/condition on my server to be redirected to google.com I ...
0
votes
0answers
20 views

Subdomain only read the index file

This is the structure of the directory: +example.com +public_html +assets //assets directory of example (css,js,img) -index.html //the index file for example +subdomain ...
-1
votes
0answers
8 views

htaccess rewrite rule to rename image [duplicate]

I will create a SEO-Friendly Picture Name but use a static filename in background. Maybee I do something wrong because I got 404 error. I will call: http://static.mss.de/images/test/frosch_1_1.jpg ...
10
votes
3answers
17k 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
0answers
11 views

Exclude 1 file from htpasswd in httpd.conf [duplicate]

I'm running a development server that's currently protected by .htpasswd pre launch, it's setup okay but I've tried to un password protect 1 file http://thesite.com/roost_manifest.json in the public ...
0
votes
0answers
9 views

SetEnvIf Work on Local But Not on Live

I'm trying to set a variable MAGE_RUN_CODE for Magento in .htaccess depending on the domain name. I have the following on my local MAMP installation, and it is working as I'd like. I have two sites: ...
0
votes
0answers
19 views

Password protect folder and allow all subfolders (apache)

I'm trying to password protect one folder on my web site using an .htaccess file with an .htpasswd file. It works and I get it to password protect it. Can I add something to my folders .htaccess file ...
1
vote
1answer
14 views

Redirect Webmail traffic through port 80?

I have set up a website on BlueHost (shared server) and I have set up webmail in a subdirectory. But every time I use the url mywebsite.com/webmail, it gets rerouted to mywebsite.com:2095 which ...
0
votes
0answers
7 views

Denying access to autogenerated file in Apache and Magnolia

I have several virtualHosts in a machine with magnolia working on it. Magnolia auto-generate a sitemap's file so I'm trying to deny its access with Apache 2.4 I've tried this: <FilesMatch ...
0
votes
1answer
17 views

htaccess rewriting same page names conflict

My htaccess file has the following two lines RewriteRule ^payment payment.php RewriteRule ^payment-confirmed payment-confirmed.php When trying to access payment-confirmed.php it just goes to ...
4
votes
1answer
3k views

Error headers: ap_headers_output_filter() after putting cache header in htaccess file

Receiving error: [debug] mod_headers.c(663): headers: ap_headers_output_filter() after I included this within the htaccess file: # 6 DAYS <FilesMatch ...
0
votes
0answers
7 views

Redirect 2 different domains to 2 different directory + .htaccess [duplicate]

Here is my directory structure: root root/exampleA root/exampleB How to redirect example.com/A to exampleA directory and redirect the rest of urls to exampleB.com
0
votes
1answer
2k views

.htaccess Rewriting Tomcat Server

I am writing a website using Railo. My code is to be deployed on a Railo Server running on Tomcat, overlayed on a regular Apache+PHP server. I need to send all requests to ...
0
votes
1answer
42 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 ...
0
votes
1answer
11 views

If mod_expires is used in .htaccess will modified files be downloaded by the client

I'm trying to employ caching to speed up the response time of a website. Most of the documentation I have read suggests setting expiration to +1 month from time of access as follows: ExpiresActive On ...
0
votes
1answer
24 views

Allow Parent .htaccess to redirect all assets

We're migrating from one subdomain to another. This particular domain has a subset of several websites. I've setup the following rewrite to handle the redirect globally: In docroot/.htaccess ("Rule ...
0
votes
1answer
8 views

Failure htaccess regax

I'm trying to get all request to the server to go to the index.php file with the request information. Also, I want to prevent accessing the index.php file directly. The second part works fine but I ...
0
votes
1answer
28 views

“deny all” for all files in a directory

My server is getting hit hard by bots, etc., looking for various files in /cgi-bin/, like search.cgi, YaBB.pl, gitweb.perl, perl, gitweb.pl, htsearch, and on and on. I want to deny all access (send a ...
0
votes
1answer
36 views

(VPS Cloud) Site goes down, htacces modified, i think due to high traffic [closed]

i have a cloud vps at ovh having 8GB of ram, a 6 vCores processor and installed Parallels Plesk 12 on Ubuntu 14.04 (64 bits) I have more than 10 sites in there but only 2 have traffic From histats: ...
0
votes
1answer
30 views

Using a .htaccess file to set specific expire rules for different folders

I have 5 symlinked folders on my website that are pulling data folders that are located in the home folder of my hosting. /home/public_html/myfolder symlink points to /home/folder1/ the pages are ...
0
votes
1answer
1k views

mod_expires doesn't set expiry for images (png,jpeg,gif)

I am using this below configuration in my apache2.conf <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access plus 6 month" ExpiresByType image/jpg "access plus 6 ...
4
votes
2answers
4k views

Why would an .htaccess file result in 403 Forbidden when the only line is “Allow from all”?

I'm running a server: Apache/2.2.8 (Ubuntu) mod_ssl/2.2.8 OpenSSL/0.9.8g Without a .htaccess file, everyone can access the web content. However, I add a .htaccess file with the following content: ...
0
votes
3answers
2k views

convert .htaccess to nginx

It's me again :( I was trying to install siwapp on my webserver but I couldn't make it work with nginx, here is the .htaccess file content: RewriteCond %{REQUEST_FILENAME} !index.php RewriteRule ...
0
votes
0answers
58 views

.htaccess rules not working or renaming

I am deploying a legacy site on a server running Ubuntu 14.04 version. This site was developed using Symfony framework 1.4 and it was originally deployed at a shared server, thus redirections between ...
4
votes
1answer
2k views

Apache sends plain-text response when accessing SSL-enabled site without HTTPS

I've never encountered something such as this before. I was attempting to simply redirect the page to the HTTPS version if it determined that HTTPS was off, but instead it's displaying an HTML page ...
0
votes
1answer
13 views

cname to subfolder re-write with htaccess

what I want to do is redirect: images.example.com/filename to example.com/images/filename I tried: RewriteCond ${REQUEST_URI} ^(images)/(.*)$ RewriteRule ^(.*)$ http://example.com/images/$1 ...
2
votes
2answers
65 views

.htaccess Lost SESSION after header redirect using mod_rewrite [L, QSA] with started session

PHP version 5.4.41 Apache version 2.2.15 Linux version 2.6.32 CentOS 6.6 I have some code that won't redirect properly. There is a lot of code and configuration, so I'm going to try and keep it as ...
1
vote
2answers
46 views

Combine http to https and domain redirects using mod_rewrite

I'm trying to redirect www.example.com to a hosted blog at https://www.example.wordpress.com. The domain redirect works, but gives me a 403 error because it's redirecting http to https. Example.com is ...
1
vote
0answers
15 views

Converting .Htaccess Rewrite Rule to Nginx

I have the following apache rewrite rule which I am trying to convert to work with nginx. RewriteRule ^(.*)\/(.*)-(\d{4})(?:-(.*))?$ album.php?artist=$1&album=$2&releaseyear=$3&extra=$4 ...
0
votes
1answer
58 views

Why doesn't my .htaccess work on this VPS?

I have the following .htaccess file in /public_html/.htaccess: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond ...
7
votes
2answers
16k views

How should I use the <If> directive in .htaccess?

I'm trying to add a conditional statement using Apache's If directive in my .htaccess file. I have referenced this page http://httpd.apache.org/docs/trunk/mod/core.html#if but it doesn't elaborate ...
1
vote
2answers
20k views

RewriteCond Exception with REQUEST_URI to RewriteRule with new Domain does not work

Following Exception doesn't work. http://www.domain.com with and without /test redirect to http://www.example.de/foo/, but the exception should not! RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] ...
0
votes
0answers
28 views

fallbackresource vs htaccess which one?

I have a website that uses .htaccess file. After digging for a problem I had, I found that I can use FallbackResource. It makes everything way simple on the apache configuration but more work on the ...
1
vote
1answer
42 views

Deny access to symlinked source

I have foo/bar.txt which should be 403 and I also have foo-hashed/hash/bar.txt which is a symlink to foo/bar.txt and should be accessible. foo/.htaccess contains Order deny,allow Deny from all ...
0
votes
1answer
1k views

.htaccess not being loaded in Ubuntu 14.04 (Apache 2.4.7)

I'm trying to use the .htaccess file in Ubuntu 14.04 (Apache 2.4.7). Here is what my .htaccess looks like # 1 YEAR <FilesMatch "\.(ico|svg|woff|eot|ttf)$"> Header set Cache-Control ...
6
votes
4answers
26k views

IIS7: How to block access with a web.config file?

I know that IIS7 allows me to have a per directory configuration with the web.config xml file. I have a directory with some configuration files that don't want to be web accessible. A local web.config ...
0
votes
1answer
21 views

Redirect to Python script in .htaccess while maintaining request URL

I have a website configured with Apache for http://www.example.com located in /var/www/example.com/. For an arbitrary sub-path of this website I would like to have all requests handled by a Python ...
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
2answers
26 views

Switching DNS is breaking https redirects

We (my company) recently switch our name servers from GoDaddy to Amazon. Our sites remain hosted on GoDaddy. Before switching name servers, everything worked fine. We have a site, ...
0
votes
2answers
3k views

mod-rewrite not working on Ubuntu

I'm trying to remove "index.php" in the CodeIgniter URLs. I have it working on my Mac (MAMP), but can’t get it working on my Ubuntu (Lucid) hosted server. This works: mysite.com/index.php/home But ...
2
votes
1answer
3k views

How to exclude a sub-folder from HTaccess RewriteRule

I have WordPress installed in my root directory, for which a RewriteRule is in place. I need to password-protect a subfolder ("blue"), so I set the htaccess in that folder as such. Problem is that ...
0
votes
1answer
19 views

Mod Rewrite not working at all, everything else in the .htaccess works correctly

This must be the 100th time a topic with this name has been created however this time its slightly different. I am trying to use mod_rewrite to enable Short URLs on a MediaWiki install. I have added ...
0
votes
0answers
8 views

block users from seeing files, while still allowing index.html to get its assets

I wonder what approach should be taken, while designing a website. need help with wrapping my head around all the details regarding this. the webdir will hold all files/assets/server-code, which ...
0
votes
1answer
56 views

http to https including www 301 redirect [duplicate]

I currently have our Magento website to redirect http to https. Basically the site should only be accessed through https including the www. I think it is working however, it currently shows as a 302 ...
8
votes
5answers
18k views

How to solve “ExpiresActive not allowed here” error message in .htaccess file?

I am trying to add Expires headers to the HTTP responses of the site I am working on. The only way for me to control the Apache 1.3 server is by editing my .htaccess file. I tried adding code such as ...