Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
4 views

htaccess on subdomain & query string

I have the following htaccess RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteCond %{HTTP_HOST} ^(.*).domain\.com RewriteRule ^(.*)$ index-merchant.php?id=%1 [NC,QSA] It can capture ...
1
vote
2answers
18 views

How have phpMyAdmin (with a Alias) with a virtual host subdomain of a different documentRoot

To increase security in my server I created an subdomain only for admin, like admin.domain.tld and usually i access phpmyadmin by going only at admin.domain.tld/mysqladmin as in config file: ...
1
vote
0answers
19 views

redirect subdomain of old domain to directory in new domain

I would like to redirect a subdomain of an old domain to a directory on a new domain. e.g. forum.old-domain.com should redirect to new-domain.com/forum The redirection from old-domain.com to ...
0
votes
1answer
9 views

Can't view domain.com/stats page with Joomla .htaccess enabled

I always have to disable my .htaccess to be able to see my stats page located unrder my domain in /stats . What can I do to tell htaccess to ignore routing /stats? ## # @package Joomla # ...
0
votes
0answers
25 views

.htaccess rewriterule doesn't work for port other than 80

I'm having an issue with apache 2.4.7 on Ubuntu. The RewriteRule statements work fine for port 80, but not for port 4080. The .htaccess has this content: Options -Multiviews -Indexes RewriteEngine On ...
2
votes
1answer
1k 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 ...
2
votes
0answers
8 views

Move htaccess rules to apache configuration files

I'm running a website with Joomla on a dedicated server (Debian), and i've read that moving .htaccess rules to apache2 configuration files may result in a good performance improvement (Apache HTTP ...
-2
votes
0answers
27 views

E-commerce website showing too many redirects. Please let me know the fix [closed]

Please find the details below: Hosting provider Digitalocean Its an apache server Website name: gergstore.com Site is on Prestashop platform This problem appeared after the configuration of ...
0
votes
1answer
21 views

Apache access control — from allow/deny to require

I'm trying to move my Apache access control directives from the older Order, Allow, and Deny to the newer Require. Unfortunately, I'm unable to think a new way after having used the old way for so ...
0
votes
0answers
19 views

How to make a 301 Redirect before proxy?

I have apache in front of tomcat. I have this proxy settings: <IfModule mod_proxy.c> <Proxy *> Allow from 127.0.0.1 </Proxy> ProxyPreserveHost On ProxyPassMatch ...
1
vote
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
0answers
9 views

How HTACCESS redirect using URL id content number range

I want redirect on range id content to a subdomain. For example: From id = 1 to 500 i want redirect to a subdomain oldcontent.example.com From id = 501 to 1000 i want redirect to a subdomain ...
0
votes
1answer
27 views

.htaccess file permissions changed

I have a weird problem on some of my servers with Directadmin and Wordpress installed. The file permissions of the .htaccess file are set to 444. When I change them back to 644, edit the file and save ...
0
votes
0answers
18 views

apache2.conf write global redirect for all sites hosted on server

I have been trying to add rules like the following to the /etc/apache2/apache.conf file but they havent been noticed, whereas if I add them to the individual .htaccess files they are obeyed and anyone ...
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
2answers
1k views

Enable Cross Origin Scripting on Nginx from retina.js to load files from another URL?

Im running a retina image plugin along with W3 Cache for CDN support. W3 cache moves images to S3, but the JS file won't server the files from there due to the difference in URL (it goes from h ...
2
votes
3answers
1k 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, ...
0
votes
2answers
39 views

How to disable the automatic redirection in WordPress-htaccess-file

WordPress has a function in its htaccess-file which performs an automatic redirection if the filenames match with an existing source. For example if you type in ...
0
votes
0answers
9 views

Apache not following RewriteRule for a symlinked dir

If I have a bad symlink as such: $ mkdir newmedia $ ln -s newmedia media $ rmdir newmedia So now media\ is a broken link My .htaccess has RewriteRule '^media.*$' https://www.google.com [R=301,L] ...
-1
votes
1answer
20 views

Override Apache method access settings

My website located at hosting server with Apache2/PHP5. When I published my site i found that on some server returns 403 Forbidden. I found that this error appears on request with method PUT and ...
4
votes
1answer
4k 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
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
2answers
662 views

Prevent server beeing flooded with requests

I'm hosting a Wordpress-blog on an Apache server (shared hosting). For some reasons I've been receiving like 100 requests per second to xmlrpc.php for a few days. The access.log looks like this: ... ...
0
votes
2answers
5k views

htaccess redirect HTTP & HTTPS non-www to HTTPS www

How can I redirect my website from all HTTP requests to HTTPS + non-www HTTPS to HTTPS with www.? Example: Redirect HTTP non-www, HTTP www. & HTTPS non-www: HTTP:// example.com/ && ...
0
votes
1answer
3k 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 ...
1
vote
1answer
36 views

.htaccess 301 redirect does not work

I have a website using PHP-based CMS system. So each page is generated dynamically, like this : http://www.shuling.net.cn/index.php?_m=mod_product&_a=view&p_id=87 Now I want to redirect ...
1
vote
1answer
25 views

301 redirect custom link

I have few thousands link like this /Gallery?cmd=viewCarGallery&carID=3747&pgID=1 Now I want to redirect them using .htaccess to another site to others link. Every will link will be ...
0
votes
0answers
10 views

HTTP to HTTPS redirect not working on internal pages [duplicate]

I am using this code to redirect HTTP to HTTPS and non www to www but not working on internal pages. Only homepage is working. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ...
0
votes
1answer
54 views

Redirect all the traffic from multiple domains to single domain using htaccess

I have hosted multiple websites on my server all sharing the same code base having one htaccess. I need something like this. if (domainname != example.com) redirect to example.com if there ...
0
votes
0answers
14 views

.htaccess losing to apache virtual host

I have a Drupal app at the default virtual host example.org running on Debian 8. I also have a separate application with a virtual host set to send requests for jones-store.example.org to another ...
0
votes
1answer
19 views

.htaccess php_value and php_flag being ignored in sub-directory

I have an .htaccess file in my public_html directory with the following rules: <IfModule litespeed> php_flag zlib.output_compression On php_value zlib.output_compression_level 2 php_value ...
-1
votes
1answer
32 views

Redirect IP to domain using SSL

I am trying to redirect my IP address to my domain which uses SSL. In my htaccess I am using following lines: RewriteCond %{HTTP_HOST} ^111\.111\.11\.111$ RewriteRule ^(.*)$ ...
0
votes
3answers
2k views

How to allow only specific directories to use htaccess?

Currently in apache2.conf I have AllowOverride all set for /var/www which simply allows htaccess for all the sites on the server (which is Ubuntu, 9.04). However, I'd rather only allow overrides in ...
1
vote
1answer
17 views

File in the same subdirectory as the HTML in CMS

I have a CMS installation with a link such as journal.org/archives/volume136/number10/37362-49383 I want to place a few PDF files in the same directory as the above HTML such that the PDFs are ...
0
votes
2answers
185 views

Block request that is possible ddos

How would i best block a request that takes on the following form in the acces 104.154.55.118 - - [19/Apr/2016:06:33:57 +0000] "GET ...
0
votes
0answers
21 views

Apache vhosts redirect to www.domain.com:PortNumber/

I'm having the following problem with Apache 2.4. I have set httpd.conf file to listen to 2 more ports (8081 and 8082) like this: Listen 80 Listen 8081 Listen 8082 DocumentRoot "C:/xampp/htdocs1" ...
1
vote
1answer
115 views

Can I use nested <If> directives in .htaccess in Apache 2.4

I am trying to simulate the permalink structure of a previous version of my site using Redirect and RedirectMatch rules in my .htaccess file. I have different rules that I would to apply to different ...
1
vote
0answers
38 views

Require all denied has no effect. Require all allowed, works

I have a website structure setup as follows, which I am trying to organize access levels for each but without specifying <Directory> as that requires the structure to be fixed (aka, if i copy ...
0
votes
1answer
28 views

How gzip compression still happening?

I am using Ubuntu 14.04.4 LTS,Apache/2.4.7 and PHP 5.5.9. I installed Wordpress 4.4.2 in my machine. When I run my site in localhost, I noticed that js/css are compressed in gzip format. I didn't ...
0
votes
1answer
114 views

How to prevent DOS attack on xmlrpc.php

We've been having trouble recently with a DOS attack on our main website, which is run using Apache httpd 2.2.9 and Drupal 6.35. The attack is a post to Dupal's xmlrpc.php, which is a known exploit ...
0
votes
0answers
9 views

Rename my hostname with htaccess? [duplicate]

When a user goes to domain1.com, i want my website to show domain2.com in the browser, how is this done in the .htaccess file? I tried the following, but no dice: AddDefaultCharset utf-8 ...
0
votes
1answer
19 views

.htaccess configuration to mask site?

I own a domain on godaddy (rainychat.com) and i have an app on Openshift (rainychat-jgal.rhcloud.com) Currently i have a forwarding rule on godaddy so when a user goes to rainychat.com it is ...
0
votes
2answers
19 views

One site handles https request with no ssl correctly, other generates \x16\x03\x01 error

We have two sites, sub.example1.com and example2.com. Neither one is specifically configured to handle ssl requests. One site https:/sub.example1.com, handles a secure request to port 443 successfully ...
0
votes
1answer
26 views

Add line to all htaccess files in www directory

I am having some odd traffic to the xmlrpc.php files hosted by the wordpress sites on my server. Instead of opening each htaccess file to add a deny rule, is there an easy way to echo or insert the ...
0
votes
1answer
18 views

Incorrect document root being set up

I have set up two virtual hosts. The configuration file is as follows: <IfModule mod_ssl.c> <VirtualHost _default_:443> ServerName a.b.com ...
1
vote
0answers
88 views

How do I allow users to override X-Frame-Options when using Apache + PHP-FPM?

I have an Ubuntu 14.04 server running Apache + PHP-FPM + FastCGI, serving user home pages. For security, I have enabled in Apache's configuration: Header set X-Content-Type-Options: "nosniff" Header ...
0
votes
1answer
11 views

Separating Redirects from .htaccess

I'm migrating my server to a different location. I have a bunch of changed URL's (50 or so) that I need to 301 redirect to new locations. I use Apache 2.4 Is there a way to separate them from ...
0
votes
0answers
19 views

“error establishing a database connection” On my wordpress website - with indexes problems?

I keep getting this: "error establishing a database connection" and this is not ending. This is /var/log/apache2/error.log: [Thu Mar 31 11:38:45.865505 2016] [autoindex:error] [pid 22782] ...
2
votes
2answers
6k views

.htaccess - redirect non www to www and retain subdomains from redirecting [duplicate]

So, on my main domain 'domain.com' I created several subdomains from cPanel, like 'sub1.domain.com' and 'sub2.domain.com'. Their real location on server is in 'domain.com/sub1' and 'domain.com/sub2'. ...
2
votes
3answers
35 views

How do I set up a toggle for an Apache RewriteRule?

I have the following Apache config, which displays a 503 Service Unavailable error to all visitors except for my IP address: ErrorDocument 503 /503.html RewriteEngine On RewriteCond %{REMOTE_ADDR} ...