Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
11 views

Apache Aliased Directory doesn't work for child directories of alias

I'm trying to run two different applications under user. Application 1: /home/user/public_html/app/public/ Application 2: /home/user/public_html/forum/ VirtualHost has the Server set to ...
-1
votes
1answer
23 views

How to Permanently redirect URLs based on conditions

everyone I will be very much grateful if anyone can help me with the correct .htaccess rules to permanently redirect all URLs that meet the criteria == ...
0
votes
2answers
15 views

Apache says it can't read htaccess file when accessing files under specific folder

For other folders, my .htaccess file works fine, but when I was trying to download files under files folder, I got an error saying You don't have permission to access /files/ on this server. Server ...
0
votes
0answers
8 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
0answers
20 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
10 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 # ...
1
vote
2answers
28 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: ...
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 ...
0
votes
1answer
28 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 ...
-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
0answers
10 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
0answers
22 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 ...
0
votes
2answers
41 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
22 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 ...
0
votes
1answer
29 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 ...
1
vote
1answer
37 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 ...
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 / ...
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
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 ...
0
votes
1answer
61 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 ...
-1
votes
1answer
34 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
2answers
198 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
22 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
0answers
39 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
29 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
120 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 ...
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
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
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 ...
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 ...
1
vote
0answers
94 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
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} ...
1
vote
1answer
50 views

How to expire image and force reload in Apache only when file in server changes

I have a PHP application running on an Apache2 server. I started off with HTML5 Boilerplate, and the .htaccess includes "1 month" expiry policy for all images. For example: ExpiresByType image/jpeg ...
1
vote
1answer
23 views

Avoid that subdomain gets redirected because of WWW canonicalization

I added this URL cnonicalization to my .htaccess file: RewriteEngine on RewriteCond %{HTTP_HOST} !^www.example.com [NC] RewriteRule ^/?(.*)$ http://www.example.com/$1 [L,R=301] But now my subdomain ...
0
votes
1answer
12 views

Serve media content only to logged in user using Apache

I recently saw this feature on another site where it would server media files, like uploaded images, only when the user is logged in. It would throw an "ACCESS DENIED" page otherwise. So, I ...
0
votes
0answers
59 views

rewrite works in htaccess but not in apache2.conf

I am trying to move rewrite rules from .htaccess to apache2.conf (at Kubuntu to use The Bug Genie software). Rewrite rules in .htaccess works fine, but after moving (and adjusting) it to apache2.conf ...
1
vote
1answer
26 views

order allow,deny blocks whole site

I can't get file blocking working. If I use the following statement in .htaccess, it blocks my whole site: order allow,deny <Files ~ ".*\.(js|JS|css|CSS|jpg|JPG|gif|GIF|png|PNG|mp4|MP4)$"> ...
0
votes
1answer
34 views

.htaccess is ignored even if rightly configured

I am getting mad: vhost: http://termbin.com/4z10 <VirtualHost *:8080> ServerAdmin istreaming@gmail.com ServerName ec2-52-36-220-163.us-west-2.compute.amazonaws.com DocumentRoot ...
0
votes
1answer
26 views

301 redirect non-www to www in subdirectories

I am in a unique situation where I have multiple instances of Joomla setup under my primary domain in different subdirectories. For example: example.com = Joomla instance example.com/subdirectory1 ...
0
votes
0answers
46 views

Ghost blog on subfolder under https in apache

I'm trying to serve ghost blog in a subfolder of my domain: mywebsite.com/blog (would be also good to serve it at blog.mywebiste.com) now, for the main website I've this configuration in apache ...
0
votes
0answers
24 views

Apache .htaccess give me a No input file specified

I known I'm asking about a well known problem, but I'm not a pro with LAMP stack and the answers I found doesn't fit my issue. This is my .htaccess file: RewriteEngine On RewriteRule ...
1
vote
0answers
700 views

htaccess: Is it possible to ask with rewritecond if the request was already redirect? [closed]

I'm having a redirect loop and it could be solved by asking with rewritecond if this is the first time since user request, or it's jumping already. Is it posibble to know inside .htaccess? Thanks in ...
1
vote
1answer
22 views

How to have an index.html and index.php together

I need to upload a file called index.html alongside my index.php (please don't ask why) Is there way to leave everything as it is and serve the index.html page only if they request it with its ...