Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
4 views

How to enable deflate compression for files?.ht

I am hosting my website on Godaddy. How do I enable compression for CSS and JS files? To compress JS and CSS files I am placing the following snippet in the JavaScript directory: SetOutputFilter ...
0
votes
1answer
820 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 ...
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
0answers
11 views

Supersede the default Apache config on a different config file

I'm using Ubuntu with Apache 2.4. The config file for Apache is found at /etc/apache2/apache2.conf at the end of this config file it's written # Current File: /etc/apache2/apache2.conf <Directory ...
4
votes
3answers
813 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
17 views

Htaccess, allow ip, deny ip and prompt for other

I have a list of ip which doesn't require login prompt ... I have a list of banned ip ( no prompt juste deny access ) But i need a prompt for all others ip ... I tried this : AuthType Basic ...
1
vote
1answer
11 views

URL rewriting a specific directory

I want to rewrite the URL when receiving a request that is not a file and either for directory subdir or not a directory at all. E.g. (!file) && ( (subdir ) | ( !directory ) ) Here's my ...
0
votes
1answer
877 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 ...
-2
votes
0answers
17 views

INNODB failure in MYSQL

I had faced an issue in INNODB Engine, but it get solved, when added buffer memory in /etc/my.cnf file, but there happened an unusual thing that the .HTACCESS file of some domains get modified as the ...
1
vote
0answers
14 views

url injection - server hacked [duplicate]

I have a vps with virtualmin installed to host 6 wordpress websites. Recently I had a notification from Webmaster Tools saying that one of my websites was hacked - URL injection. I saw in Analytics ...
-2
votes
2answers
53 views

How to set custom $_SERVER variable for PHP

I'm working on a PHP web app which ALSO has some command line tools. I need the command line tools to detect the environment so that they connect with the correct DB credentials etc. The web app does ...
0
votes
1answer
21 views

mod_rewrite in .htaccess and basic auth in vhost - access to paths

I want to lock down a website (made on Drupal) with basic auth. Drupal is using mod_rewrite in its .htaccess file. The problem I'm facing is this - my virtual host looks like this: <VirtualHost ...
0
votes
1answer
18 views

.htaccess not working on ubuntu 14.04

Here is relevant code from 000-default.conf: <Directory /var/www/html/> AllowOverride All </Directory> But when I put a .htaccess even with nothing in it every site except for the ...
1
vote
0answers
9 views

.htaccess redirect keeping url when there is wordpress code involved [duplicate]

I have two domains, alfa.com and beta.com. Beta.com points to alfa.com subdirectory named "ae" by following htaccess-file. It works fine, but what should I add to code to keep beta.com URL and not ...
0
votes
1answer
29 views

Transforming URLs with query strings to simple URL with subdirectory

I need to redirect all URLs with query strings like: www.example.com/?query to www.example.com/query ie I only need to remove the ? after the URL and preserve the query like a subdirectory request ...
1
vote
1answer
45 views

How to include local settings in an .htaccess file that is shared between different servers?

I am running a small network of web servers (Apache 2.2/2.4) using essentially the same CGI infrastructure on different machines (and under different domains). The function of each site depends on ...
0
votes
1answer
896 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 ...
3
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
64 views

wordpress 4.1 force http intp https with .htaccess

I would like to force https with correct Comodo Certificate, in the website www.cabdrome.com with .htaccess (and not only from php). My webserver suggest to use these row to force HTTPS for an entire ...
0
votes
1answer
28 views

Block a unique hash in URL through NGINX

I need to block a hash which is inside a URL through nginx. The URL which requires to be blocked is ht tp:/ /mp3s tri ng.c ...
0
votes
1answer
596 views

Apache authentication inside a WordPress install

I am currently running into an issue with trying to password protect a directory that is sitting inside a directory that's running WordPress. This is for a directory called "admin" that handles a few ...
0
votes
0answers
10 views

how can I make wp-content/uploads directory not accesssible [closed]

I read quite a lot of advice but nothing seems to work. What I want is - the directories in wp-content/uploads to be not accessible by the public. And also - if someone type up this directory to be ...
-2
votes
0answers
16 views

CodeIgniter php framework: js and css files inside “application” folder. How to do? [migrated]

I just installed the php framework CodeIgniter 3 and it seems that JS,CSS and images should be placed OUTSIDE Application folder. If not, link to those files inside views does not run. For many ...
0
votes
2answers
862 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
29 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 ...
1
vote
2answers
55 views

Redirect http to https with htaccess does not work

# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} ...
1
vote
0answers
22 views

Convertion of htaccess rewrite rule to nginx [closed]

Through searching the internet with "converting htaccess to nginx rule" I came up with anilcetin and winginx .htaccess to nginx converter which I doubt it doesn't correctly output what I need. Which ...
0
votes
0answers
7 views

Redirect old domain to new domain [closed]

I have a problem here. My old and new domain are in the same document root(public_html/domain) I want to redirect the old URL to New URL. I used this code and put it in .htaccess but didn't work: ...
1
vote
0answers
16 views

How to redirect all uppercase .JPG extension to lowercase .jpg using htaccess? [duplicate]

I need it to be so that any time anyone visits url like: mydomain.com/SomeThiNg/file.JPG they instead visit: mydomain.com/SomeThiNg/file.jpg Like above, ONLY CHANGE THE CASE OF THE JPG ...
0
votes
1answer
980 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
19 views

Mod-rewrite with GET [duplicate]

I'm trying to get my htacces to rewrite URLS with GET parameters but hopelesly failing. I'd like for this: domain.com/landingpage?variableone=true&variable2=false to be converted to this: ...
1
vote
1answer
24 views

Force https before authentification - no access to vhost

I am a beginner when it comes to servers and I have a problem similar to this one. When accessing the desired webpage, .htpasswd prompts me for an authentification before I am redirected to https. ...
0
votes
2answers
1k views

How to add an additional RewriteCond to exclude a specific url?

I have an existing .htaccess file with the following rewritecond: RewriteCond %{HTTP_HOST} !^go\.domain\.com$ [NC] RewriteRule ^(.*)$ https://go.domain.com [R,L] In essence, everything on this ...
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
0answers
19 views

Apache mod_rewrite to remove slashes is writing redirect using the filepath not a uri

Unfortunately I don't have direct access to this server so trial and error via a proxy person is proving difficult. We have the following Location directive (along with others) within a VirtualHost ...
8
votes
1answer
2k 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 ...
0
votes
1answer
1k views

Apache SetEnvIf failing to match Request_Uri

Simple condition, which never match and set variable: SetEnvIf Request_URI "^/path/to/something*" access_granted Checking URI by using PHP is giving correct string, however variable is never set. ...
1
vote
1answer
39 views

.htaccess query string blocking phpmyadmin

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 ...
-2
votes
2answers
42 views

What will happen if I force https for my image hosting site via .htaccess but embed an image with an http link? [closed]

I've built myself a small image hosting service for my own projects and I recently switched the site to https which works perfectly. Now I made a .htaccess file with a rewrite rule as described here ...
0
votes
1answer
39 views

Enable curl_exec() in a sub-folder

Curl is enabled on the server but curl_exec function is disabled for security reasons. disable_functions = exec,passthru,shell_exec,system,proc_open,popen, ...
0
votes
1answer
53 views

.htaccess redirect only when URL doesnt match a specific URL [duplicate]

In our app we allow custom domains, so a user can create: custom.my.example.com Which we map to: app.our.example.com In our app we enforce SSL, except for when the user enters a preview URL such ...
1
vote
2answers
53 views

Redirect depending on preferred language (Accept-Language) with .htaccess

When users request /, I want to redirect them to /en or /de, depending on their preference specified in the HTTP request header Accept-Language. I guess this is easy with server-side scripting, but I ...
2
votes
1answer
48 views

Force SSL not working either with Joomla or htaccess

We have a multiple sites in Joomla. Following are the details. Hosted on domain mydomain.co.in, sub.mydomain.co.in. Amazon EC2 instance, behind load balancer. We have bought WildCard SSL certificate ...
0
votes
2answers
68 views

Apache LIMIT directive does not allow to see localhost project over LAN

I want to allow to see my localhost project over the LAN using Apache LIMIT directive in .htaccess my localhost project URL is http://192.68.0.123/myproject below is the .htaccess part which cause ...
0
votes
2answers
1k views

Apache RewriteRule - Proxy flag not working

I'm having a problem running Apache 2.2.20 on a Linux Mint distro. I've got the following rule in my .htaccess file: RewriteEngine on RewriteRule old1/old2 http://localhost/new1 [P] When I browse ...
0
votes
2answers
2k views

.htaccess - Too many redirects

I am getting a "too many redirects" error from the following two .htaccess files. .htaccess on domain 1 Redirect 301 / http://www.domain2.com/ .htaccess on domain 2 RewriteEngine On RewriteBase / ...
1
vote
2answers
251 views

Server remembering old rewrite rules, even when I remove htaccess

I have set up a development server with Ubuntu and LAMP, but for some reason the .htaccess is acting strange... There is a site on there with a set of rules, when I comment them out they still work, ...
1
vote
1answer
35 views

Limiting the access to /wp-admin/ for the whole server

I want to limit the access to /wp-admin/ to specific IPs or even localhost it's described here http://codex.wordpress.org/Brute_Force_Attacks#Limit_Access_to_wp-admin_by_IP but that seems to be for ...
0
votes
1answer
25 views

.htaccess error with multiple rewriterules

I'm having a bit of an issue with my .htaccess file. I recently got an SSL certificate for my website and the https:// is working perfectly. However, I wanted to redirect any traffic using http:// to ...
0
votes
2answers
1k views

Only allow access to /admin from a specific domain?

If I have multiple domains pointing to the same site. If I have a domain called admin-domain.com I only want to allow admin-domain.com/admin/ But disallow anything-else.com/admin/ Also this ...