Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

7
votes
5answers
17k 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 ...
2
votes
1answer
900 views

Apache deflate ignores javascript

I have set up deflate in my htaccess. Everything works fine, except for some reason javascript files are being ignored. I tried every possible combination of AddOutputFilterByType DEFLATE with ...
0
votes
0answers
15 views

URL routing for domains

I have a site with 10's of thousands of users. Each user has their own site hosted by me at a subdomain of mysite.com/user1 or as an add on domain at user1.mysite.com or user1.com. This is all done ...
0
votes
0answers
11 views

.htpasswd cgi-bin using htaccess not working

I'm trying to password protect the cgi-bin on a cPanel site, i've password protected the directory and added: <Directory /home> AllowOverride All </Directory> to the Pre VirtualHost ...
7
votes
3answers
996 views

.htaccess redirect all extension to php

I recently updated my .htaccess file to hide the .php extension of the urls. It works nice, when I try to reach domain.com/index, it displays the php file. When I type domain.com/index.php it ...
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 ...
17
votes
4answers
33k views

How to get apache2 to redirect to a subdirectory

I am running apache2 on debian etch, with multiple virtual hosts. I want to redirect so that http://git.example.com goes to http://git.example.com/git/ Should be really simple, but google isn't ...
0
votes
1answer
11 views

redirect to new type of url and remove parts of the url with exception

I need to redirect old links to new links. The new links will be a bit different. For example this (I have marked with capslook on the part that doesn't belong to the post name) ...
0
votes
0answers
8 views

Redirect ip with folders to domains with htaccess [duplicate]

Currently I am using .htaccess file below, but it only redirects correctly with simtanda.com and not with "heartslovefree.com". So help me out please: RewriteEngine on # SIMTANDA RewriteCond ...
0
votes
1answer
113 views

Redirect to absolute URL in .htaccess returns wrong host name on OpenShift

I'm setting up a web site on OpenShift. It runs under Apache 2.2.15, but I do not have access to the Apache root or logs so I am trying to emulate virtual directories in an .htaccess file at the root ...
0
votes
2answers
924 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
24 views

Apache 2.4.12 Redirect Wordpress subfolder to another server ip address

I am running wordpress inside the laravel public folder which acts as the root of my site. How do I redirect to another server ip address i.e. (xx.xx.xx.xxx) when one accesses the following subfolder: ...
1
vote
2answers
248 views

Deny all “direct” traffic [duplicate]

My server is under heavy attack (maybe DDOS, I've no idea). I've checked the access logs (to put things into perspective, it's site with a daily 1000 visitors, nothing fancy): 78.176.175.208 - - ...
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
1answer
31 views

Use .htaccess to redirect to a symlinked subdir of the web root?

I'm trying to use Envoyer.io to deploy my code and I'm running into some issues. This utility makes two folders, current and releases. current symlinks to latest release in the releases folder. So ...
0
votes
1answer
26 views

Strange output from RedirectMatch

I'm trying some 301 redirects in .htaccess. I'm trying to redirect something like this: http://creek.com/wines/red/greatwine into http://creek.com/shop/product/wines/red/greatwine but I'm ...
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
0answers
18 views

htaccess doesn't work on mac / apache 2.4 [duplicate]

This is what I get in apache error log after reloading the page: [client ::1:54342] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ...
1
vote
2answers
121 views

htaccess redirect loop only on one of two servers

I have a web app installed on two servers. On one of the servers, when I'm accessing the homepage I get the "Error code: ERR_TOO_MANY_REDIRECTS" error in the browser while on the other one everything ...
0
votes
0answers
25 views

Android browser file not downloading from linux server

I have two linux servers with domains i.e redsignal.net and eventbuizz.com I have uploaded same PDF files on both servers. PDF file on redsignal.net PDF file on eventbuizz.com When I open first ...
1
vote
0answers
34 views

Is it possible to detect if client supports SNI? [duplicate]

So my SSL is using SNI, Bing doesn't want to index my site because of that and also some other sites are having problems. Such as reddit. Is it possible to detect if client supports SNI? I was ...
0
votes
2answers
51 views

Redirect page/subfolder to new domain url without changing url in browser

I have been looking for an answer this without any luck (searched everywhere) Basically, I want to rewrite a page (subfolder) to a new domain without changing the url. I've tried with no luck: ...
0
votes
1answer
21 views

How can I avoid non-existent file -systematically- requests?

This is my apache httpd log: [Wed May 13 18:29:48 2015] [error] [client 108.162.213.59] File does not exist: /www/html/ui/core.min.js [Wed May 13 18:29:48 2015] [error] [client ...
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 ...
0
votes
0answers
61 views

Mod - Rewrite / .htaccess Issue with Apache 2.4.12

The file structure is as follows Public files: /home/usrname/public_html CGI BIN, where the software is running: /home/usrname/public_html/cgi-bin Private files: /home/usrname/public_html/_private ...
2
votes
1answer
25 views

Is it possible to enable htaccess for one directory only?

I've investigating performance problems on a website. The software we're using requires htaccess (i.e. it generates .htaccess itself if it's not there, so moving the rules to httpd.conf is not an ...
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
31 views

htaccess redirect of search results [duplicate]

I am having some trouble redirecting some old URLs to new ones. This is the old path: /index.php?loadpage=./includes/search.php&searchstring=KEYWORD and I want it to redirect to this URL: ...
-1
votes
2answers
46 views

I want to make non-www domain redirect to my www domain [duplicate]

I was wondering on how would I make my non-www domain would be direct to www domain. I've tried to configure my .htacces to redirect my non-www to www but since non-www was defualt it was infinitely ...
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 ...
0
votes
1answer
15 views

IIS Domain is always routing to Domain Root

going to https://www.example.com/about always leads back to https://www.example.com/ How do I stop this while forcing a https://www.example.com/? non-www.htaccess RewriteCond %{HTTP_HOST} !^www\. ...
1
vote
1answer
3k views

Apache server-status returning 404, then redirecting to my Wordpress install

I'm trying to get Munin's various Apachie plugins to work on my web server, but I'm hitting issues. Upon asking Munin to check available plugins, two of the three Apache plugins return an error saying ...
0
votes
0answers
17 views

Remove url query [duplicate]

how can I change from this: http://localhost/ajax/rsc.php?r=feed.js to this: http://localhost/ajax/rsc.php/r/feed.js ? (using htaccess)
1
vote
2answers
72 views

301 redirect from non www to www issue [duplicate]

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 ...
-1
votes
0answers
10 views

redirect uppercase to lowercase and remove double plus hyphens in httpd [duplicate]

My website is based on mp3, first my website URL looks like website.com/mp3/song-name due to some SEO reasons I changed it to website.com/song-name-mp3-download.html using htaccess ...
4
votes
5answers
45k views

How do I use .htaccess to always redirect from HTTP to HTTPS? [duplicate]

There's a few similar questions which I tried to work out the answer from, but so far I have been unsuccessful. Please advise how I can always redirect http to https (and also remove www. from the ...
-5
votes
1answer
33 views

pingdom sacking my site's resources [closed]

It appears that somebody created a pingdom account to ping my site once a minute, and since my website isn't hosted on a very strong server anyway, those requests get heavy and slow down the server, ...
0
votes
1answer
76 views

Blocking UserAgent libwww-perl with .htaccess not working?

The server is running on Apache, and trying to block libwww-perl, but not sure why it's not working. I've put the following in my .htaccess, but when I run the test I still get the notification that ...
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 ...
2
votes
1answer
942 views

Fully restrict access to sub-directories with .htaccess

With .htaccess, how can I block access to any sub-directories (and its contents) when they are accessed directly (using the browser's address bar for example)? I'm on a shared host, so I do not have ...
1
vote
0answers
12 views

Enable/allow Proxy From Different Server With SSL

I have a node.js app on server A (http://sub.domainA). My customer wants to use this solution without redirecting. The configuration in .htaccess for the node.js service on server A looks like this. ...
0
votes
2answers
108 views

Multiple custom redirects with apache

I would like to set up multiple redirects using apache but am completely stumped as to how to do it? I have a nodejs instance which serves up my home page running on my server on port 4000. It can ...
0
votes
2answers
771 views

how to redirect from “https://www.example.com” to be “https://example.com”?

I want to know: How to redirect from .. https://www.example.com to be https://example.com via .htaccess or CPanel? As the SSL only installed on the one without "www", and when I visit the ...
0
votes
1answer
27 views

Block an http referrer on the server level

I am seeing multiple fake http referrers to several sites on my server, which for the most part doesn't bother me, except that they distort visitor stats. I have filtered the questionable domains out ...
-1
votes
1answer
14 views

Godaddy .htaccess and mod_url

I'm an experienced full stack developer and freshly minted webmaster. Recently my client asked me to create a redirect from one url to an outside page. I know how to make a page redirect and I'm ...
0
votes
0answers
26 views

.htaccess multiple rewrite rules .php & .html

I'm pretty new to editing .htaccess and I'm still trying to get a grasp of what to do. I currently have the following code: Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f ...
0
votes
1answer
90 views

How To Force Rewrite and Redirect Url [duplicate]

I have a url: http://domain.com/i.php?c=PT and I Rewrote it to http://domain.com/PT successfully. But When I browse http://domain.com/i.php?c=PT, it wont redirect to http://domain.com/PT. Is there ...
-2
votes
1answer
21 views

How to redirect between Wordpress site using .htaccess if the origin has .html [closed]

How to redirect between Wordpress site using .htaccess if the origin has .html the first site i use permalink .html example: www.domain.com/articles/content.html if i'd like to use 301 redirect to ...
0
votes
2answers
19 views

rewrite www.mysite.com requests to www-staging.mysite.com with .htaccess

I have a staging and production Apache server. To access staging I just go to www-staging.mysite.com/a/sub/directory. To access production, just remove the -staging in the www. Currently, all the ...
0
votes
0answers
43 views

Total DNS errors 100% in openshift

From yesterday suddenly my website down and Google webmaster shows Total DNS errors 100%. My app is http://core-ahang2mail.rhcloud.com I don't know what should I do, Could you please help me? ...