Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
14 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
votes
1answer
25 views

Apache Redirect to another folder, both within and outside document root

I've recently set up a home web/media server and having a few difficulties with a few of the settings. It's working fine for serving webpages etc but I've now reorganised the structure of the main ...
0
votes
3answers
67 views

Deny connection to and from a specific hostname on Ubuntu/Apache2

My wordpress EC2 server was probably hacked. When running iftop command I can see that my server sends and recieves data from a hostname name "i157panamamails.com". This hostname never goes away and ...
-2
votes
0answers
16 views

Should I use robots.txt to block these folders?

I have a fairly standard lamp setup on a VPS I got a few months back. I have about 10 websites in '/var/www/website.com/public_html' type folders which is pretty common as I understand. I have a main ...
-1
votes
2answers
44 views

.htaccess file isn't working for https

I have simple .htaccess file to forbid access to a directory as : order allow,deny deny from all Well, it doesn't work with SSL and show the content of directory if client access the directory ...
-5
votes
1answer
31 views

Configure subdomain godaddy and use an existing CERT [on hold]

I just created a subdomain ony my domain named: profile.cv.hsoto.me However, when I try to access it, I get a warning: I'm not sure how to fix this. My .htaccess file is as follows: # BEGIN ...
-1
votes
0answers
17 views

Combining htacess files [closed]

I have 2 separate htaccess and i need to combine them into one but im not sure how to do it. These are my htaccess: 1. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ...
0
votes
2answers
33 views

Apache: Stealth 404 the admin area until authenticated via basic auth, then allow access

Given a administrative area with urls like this: wp-admin/ wp-admin/whatever wp-admin/another-page wp-adminsecretlogin A standard basic-auth coverage would provide a username and password prompt on ...
0
votes
0answers
23 views

Show 404 page with redirecting to www only

I want to change the 404 error. What I did is redirecting the 404 error page to a custom one, without redirecting the URL itself. This works perfect (http://www.gincher.net/not.exist)! I'm using ...
-2
votes
1answer
16 views

mod_rewrite redirect any domain except principal domain to the principal domain [duplicate]

I have some rules as follows: RewriteCond %{HTTP_HOST} ^domain.com RewriteRule ^(.*)$ http://www.domain.com/$1 [R=permanent,L] I would like to make the rewrite condition match ANY domain OTHER than ...
0
votes
1answer
22 views

.htaccess is not working on Zend server on Windows

I am a beginner to MVC framework in PHP and also to .htaccess file. I use Zend server on Windows OS. My code in .htaccess is: RewriteEngine On RewriteCond %{REQUEST_FILENAME} -d RewriteCond ...
0
votes
1answer
41 views

where to put wordpress htaccess on openshift

I have cloned my wordpress application from openshift with git, in my cloned application there is php folder, when i put my htaccess file in it then i commit my changes like this : git add -A git ...
0
votes
1answer
40 views

htaccess password multiple password same user [closed]

How to assign multiple passwords to the same user in .htaccess password protection? It looks like this in my .pass file, but only the first one is working christina:o5hZ6Uplugq.2 ...
1
vote
1answer
39 views

apache expires not working for pyramid server

I have a pyramid server running on EC2 via apache with following configuration - <Directory path_to_virtual_env> WSGIProcessGroup pyramid Require all granted Order allow,deny ...
1
vote
0answers
47 views

blocking referring domain and all of its subdomains via rewrites in htaccess

I'm looking to block two referrers along with all of their subdomains. When using this in my htaccess, they're not getting a 403, but instead a 500 response from apache (complaining about too many ...
0
votes
0answers
45 views

Apache Alias on multiple vhosts + redirect rules

I'm facing a tricky problem and I have problems to solve it through Apache config. I have two vHosts on my machine: A) /var/www/front/web app.domain.ext B) /var/www/api/web api.domain.ext This ...
0
votes
1answer
105 views

Invalid command 'AuthType', perhaps misspelled or defined by a module not included in the server configuration

I'm trying to password protect the document root and all I get is an "internal server error" page. The Apache error log shows: Invalid command 'AuthType', perhaps misspelled or defined by a module ...
0
votes
1answer
72 views

htpasswd - Any tip to block brute force attacks?

Update: As Craig suggested I'm trying fail2ban now. Even though I have issues in that as well. failregex is not finding any result though. I had enabled all apache* in jail.local and here is how my ...
0
votes
1answer
36 views

Conveting .htaccess to Ngix rules

I need to convert htaccess file to nginx config. I http://winginx.com/en/htaccess but an error occurred when I update the nginx config file. The htaccess file reads: DirectoryIndex index.php ...
-1
votes
2answers
66 views

Autodiscover URL redirection from cPanel Apache to different Subdomain URL on an IIS/Exchange server

== The Current Situation: == We have a web and DNS server for contoso.com (10.10.10.1) This web server 10.10.10.1 is also the mail server for @fubar.contoso.com We then have another server for MS ...
0
votes
0answers
64 views

Showing only domain with .htaccess and mod_rewrite

I currently have koken installed to my website (wythDOTno-ipDOTbiz/koken). I know that the .htaccess file in the koken folder is working, because it is making the url's clean by removing the ...
0
votes
1answer
51 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
1answer
64 views

htaccess and rewrite - Internal redirect within Alias

I have the following .htaccess within a subdirectory: RewriteEngine on RewriteRule ^file.js$ file.php This works by internally redirecting the request to the PHP file, with the same name, which is ...
0
votes
1answer
32 views

can htaccess file define different RewriteBase for production and dev servers

I have htaccess files that use different RewriteBase on production and dev (windows) pc. Currently I change the RewriteBase manually when deploying. Can this be done automatically with some ...
1
vote
1answer
69 views

Why can't I redirect url's with “index.html” in it to a php file?

I'm stuck in a big problem, but let me start with one part of it. I am wodering why this works: RewriteRule ^(.*)index.html $1 [R=301,L] while this doesn't: RewriteCond %{REQUEST_FILENAME} ...
0
votes
0answers
49 views

Multiple Rewrite rules not working in htaccess file (mod_rewrite)

Can anyone help me how to write multiple rewrite rules in htaccess file. In my condition I want to remove index.php from url and also want to use file based cache busting, I am using following code in ...
0
votes
0answers
24 views

How to allow access to the site root document in htaccess?

What I am trying to accomplish looks quite simple: allow the site's index.html for everybody and hide everything else from everybody. Needless to say the index.html file can be addressed as ...
-2
votes
1answer
24 views

Redirect entire site to URL with 302 - All URLs to 1 URL [duplicate]

What i want to do is redirect an entire forum temporarily to a Twitter Page. However anything i've tried hasnt worked. If they visit for example site.com/Forum it will send them to ...
1
vote
0answers
36 views

Tomcat 8 with Apache, Configure Several Java & WordPress Domains

** PROBLEM SUMMARY ** I think the subject line defines my question pretty well, but I'm going to give an example of my current and goal setup for clarification. Considering the sheer number of ...
0
votes
1answer
104 views

.htaccess rules to stop DDoS POST flooding

We're under a distributed denial of service attack from traffic that looks like this: 49.146.161.175 - - [11/Jul/2014:00:43:42 -0400] "POST / HTTP/1.1" 500 557 "-" "Mozilla/4.0 (compatible; MSIE 6.0; ...
0
votes
1answer
30 views

How to use # in url as a redirect rule in htaccess for apache

I am having a difficult time figuring out how to have the following work: I am trying to redirect a url in htaccess I am trying to redirect from example.com/test.html to example.com/index#test I ...
-1
votes
1answer
32 views

IIS (or .htaccess) URL Rewrite not working correctly - need to capture number argument as query string

I'm trying to have: http://sub.domain.org/123456 become http://sub.domain.org/index.php?q=123456 I have tried many ways, and one way sort of worked, but then all subdirectories (including images) ...
-1
votes
0answers
17 views

PHP FPM with Apache 2.4 htaccess [duplicate]

I have an install of Apache 2.4 with PHP executing through FPM. <VirtualHost x.x.x.x:443> SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP ServerAdmin ...
1
vote
3answers
125 views

apache 2.4, mod_proxy_fcgi not honouring .htaccess, work around needed

I am using apache 2.4.7 with mod_proxy_fcgi for purpose of passing through php to php-fpm (this will be used for shared hosting environment). The htaccess works fine for non php files, but once it hit ...
2
votes
1answer
47 views

How to make htaccess not redirect to http on form submission

Part of my .htaccess file forces https on certain pages (e.g. when user logs in, enters credit card information, etc.) while forcing http on all other pages. This seems to be the ideal setup for what ...
0
votes
1answer
57 views

redirect string to different url in nginx

I want to redirect a string to different URL in nginx. This what my vhost looks like and is working fine. server { listen 80; server_name secure.example.com; root /opt/tomcat/webapps/test/; ...
0
votes
1answer
51 views

How can I rewrite from /page to /xx/page, using htaccess & apache only?

Hi I have found many resources on mod-rewrite and Apache but I haven't been successful of making a working example. The example below works for āœ“ WORKS example.com/en/page1.php ā˜ž ...
0
votes
1answer
27 views

mod_alias.c rule to redirect all subdirectories

A mod_alias newbie here. I found the rewrite rule below somewhere and have been using it to block bots and hackers that hit my site, looking for directories like HNAP1, wp, blog, etc. And it works ...
0
votes
1answer
35 views

htaccess redirect from one domain to another domains subdirectory [duplicate]

I want to redirect this way: from www.example.com/link.php?a=1&b=1 to www.example.net/subdirectory/link.php?a=1&b=1 I tried to use this .htaccess which isn't working: Options +FollowSymLinks ...
0
votes
1answer
46 views

htaccess rule for url not ending with certain words

I need to rewrite few urls if those url not ending with certain words. For example, i need to rewrite following url /category1/subcategory1/aproduct-url-title to ...
0
votes
1answer
188 views

Ubuntu Apache2 server not allowing CORS or reading .htaccess

I have a couple issues, the first is my apache2 server is not reading .htaccess I have apache2.conf setup like so: # AccessFileName: The name of the file to look for in each directory # for ...
1
vote
0answers
99 views

Apache2 - 500 server error when trying to access .php file

I have a webserver (Apache2, configured on Ubuntu Saucy Salamander 13.0x). On this server I have the following file in question: /var/www/xxxxx.com/insertToDB.php Accessing this file using GET ...
0
votes
0answers
72 views

Redirect url get variables after rewriting htaccess

My original url was this: wwww.domain.com/car-details.php?merk=BMW&model=X5&titel=sale&car_id=3 I have Rewrite it into this: wwww.domain.com/BMW/X5/sale/3 By putting this in my ...
0
votes
0answers
38 views

.htaccess password not working

I've been trying to use .htaccess to password protect a folder for a website. Unfortunately I can't seem to get it to work. I'm not getting an error, but the password being set in the .htpasswd file ...
0
votes
1answer
76 views

deny from .htaccess with banned IP list from stopforumspam.com not working?

so i'm trying to use .htaccess to ban a large list (50,000) of suspicious spam IP addresses that i got from this site. the list is almost 1M in size when i add the deny from directive for each ...
0
votes
1answer
68 views

.htaccess Not Working Despite AllowOverride All

Apache HTTP Server 2.2.22 Arch Linux i686 I am using the HTML5 Boilerplate .htaccess with WordPress Multisite, which requires two .htaccess files. Iā€™m not sure which would take precedence, so I ...
1
vote
0answers
244 views

Apache SSL redirect loop

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 ...
-4
votes
1answer
62 views

Where is .htaccess? and should I do it server wide or per cpanel account? [closed]

I want to do this? http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/ # compress text, html, javascript, css, xml: AddOutputFilterByType DEFLATE text/plain ...
0
votes
1answer
46 views

rewrite rule does not rewrite url as expected

I have a problem with a CMS website, that normally generates readable urls. Sometimes it happens that navigation links are shown as www.domain.com/22, which results in an error, instead of ...
1
vote
1answer
65 views

apache robots.txt with SSL

I have an .htaccess file with a rewrite rule to get a redirect of every HTTP request to HTTPS. But now I have a problem that my robots.txt is not recognized by some online checker. If I remove the ...