Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
6 views

removing ?reg=username does not go to the correct replicated URL

we have a replicated wordpress website with an affiliate plugin installed, the standard URL is domain/?reg=username. we have tried to remove the ?reg= using .htaccess file and become domain/username. ...
0
votes
0answers
14 views

.htaccess rules for accessing subdirectory as document root

I'm using Magento on a LAMP stack. I have my primary store/application accessible from the root directory (e.g. website.com/). I have created a custom form for processing 3rd party vouchers at ...
-1
votes
0answers
16 views

Forcing download file instead of show in browser

My "file_name.txt" is displayed instead of download. I have tried that <FilesMatch "\.(?i:txt)$"> ForceType application/octet-stream Header set Content-Disposition attachment ...
0
votes
0answers
36 views

My hosting/website is hacked. Links redirect to russian site [on hold]

I coded a website on my computer, I registered domain, and put my files on 2freehosting.com. While testing this site I noticed something weird. When I clicked on any link on my website a new window ...
0
votes
1answer
12 views

301 Redirect Root and Only Root (“/”) from https to http

I have found several Q/As on how to redirect root only, how to redirect from https to http (using .htaccess). But there was no question that merged both. And this answer is too dirty: ...
0
votes
1answer
28 views

htaccess conditional redirect to https

So i'm trying to redirect to https all visitors except my internal networks 192.168.x and 10.x RewriteCond %{HTTPS} off RewriteCond %{REMOTE_ADDR} !=(192\.168\.$|10\.$) RewriteRule (.*) ...
0
votes
1answer
21 views

Restrict access to entire website except the homepage using .htacess

I have just put a website live, but I need to restrict access to everything except the homepage for users outside of my IP address. I would like to do this using .htaccess. So far I have come up ...
-3
votes
1answer
50 views

Ah, Domain Issues [closed]

I own http://www.sazook.com, and lately I have been fiddling on with the .htaccess file. I am using neq3's hosting services, and I had the .htaccess set to redirect to my own 404 page. Upon going to ...
0
votes
0answers
30 views

Apache Gzip not compressing js files

I have enabled Gzip compression via adding the below to my .htaccess file: <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ ...
-1
votes
1answer
21 views

Tomcat app behind Apache, htaccess auth

Please help to set up a protection for Tomcat app with .htaccess. I want to use mod_proxy ProxyPass and ProxyPassReverse My tomcat app: www.example.com:8085 What I want is to make it impossible to ...
0
votes
0answers
9 views

.htaccess not working inside a firewall or proxy

I have a test site running with an .htaccess file defined like so: AuthName "test" AuthUserFile "/home/testdomain/.htpasswds/public_html/passwd" AuthType Basic require valid-user This requires a ...
1
vote
1answer
92 views

Nginx rewite rules 403 error

I am having trouble with converting .htaccess files to nginx. I have 3 .htaccess files. The first .htaccess file is located in the document root and is as follows: Options +FollowSymLinks ...
0
votes
1answer
26 views

nginx .htaccess in two diffrent folders

I have a script that has 2 .htaccess files. The fist .htaccess file is in the root directory, and the second is in a folder under the root directory called upload. However, what I can not figure out ...
0
votes
0answers
14 views

How to cache particular file in folder using .htaccess

i tried google and found one solution at 'http://webmasters.stackexchange.com/questions/24881/cache-a-particular-image-using-htaccess' but it cache all the file of folder, i want to cache only ...
2
votes
3answers
42 views

nginx [emerg] unknown “0” variable

I've been trying for two days to convert an .htaccess to nginx rewrite the original file looked like this: # Turn on URL rewriting RewriteEngine On RewriteBase // # Protect hidden files from being ...
0
votes
1answer
34 views

RewriteRule not working properly in my ubuntu server 14.04 running in Windows Azure

In my server I kept signup.php and in htaccess I kept this thing - RewriteRule ^registration/$ signup.php [nc] However it's working fine in my Windows machine running Wamp. But not ...
0
votes
1answer
11 views

Alter RewriteRule to change parameter results

Here is my Apache 2 Directory configuration: <Directory /var/www/html/website/> Options +SymLinksIfOwnerMatch RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f ...
1
vote
1answer
46 views

htaccess redirect whole url as parameter

We have created an iframe loader index5.php which will show two iframes, iframe1 and iframe2. The content of iframe2 can be set by accessing index5.php?url=iframe2url. So, going to ...
0
votes
1answer
51 views

Configuring .htaccess on a site with a CodeIgniter app and traq issue tracker

I have this site running on CodeIgniter and I have installed traq for issue tracking. Under public_html I have my application and system directory as well as an assets directory, and also traq. i.e.: ...
0
votes
0answers
13 views

Cache-Control only working for media files and not static files served in Django

I'm trying to use Cache-Control for my static files. Following is my code for the .htaccess file # 1 YEAR <FilesMatch "\.(ico|svg|woff|eot|ttf)$"> Header set Cache-Control "max-age=31536000, ...
-1
votes
0answers
16 views

Receive OK from PHP file before showing the page, using HTACCESS

I'm hosting on my servers few files (like photos) that I don't want to be public. So I build a PHP form that asks for OTP, and if the code is correct, it shows "OK". It's not hard to prehibit the ...
2
votes
1answer
113 views

Apache, htaccess, url rewrite

I have .htaccess file I'm using for testing, here is my file: RewriteEngine On RewriteCond %{REQUEST_URI} ^/([a-z-]+)/?$ [NC] RewriteRule ^ %{REQUEST_SCHEME}://%{SERVER_NAME}/?title=%1 [L] I'm ...
0
votes
1answer
114 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
5 views

different CNAME to corresponding subfolders [migrated]

I have three wordpress websites hosted on Apache server in three different subfolders, like www.mydomain.com/sub1;www.mydomain.com/sub2;www.mydomain.com/sub3 Now, I have three new domain names ...
0
votes
1answer
10 views

static files from subdomain, fcgi from root

I would like to send requests for foo.com -> foo.com/dispatch.fcgi and requests for a subdomain bar.foo.com -> foo.com/bar I have this in my .htaccess file; AddHandler fcgid-script .fcgi ...
-1
votes
0answers
15 views

mod_rewrite - clean url path the same as directory [duplicate]

I have a directory /news within the root directory and I have a /news path within my application. I have some subdirectories and files in the /news directory. How to allow request the subdirectories ...
0
votes
2answers
38 views

SetEnvIfNoCase Host: .htaccess to web.config conversion

I have tried IIS Manager and some online conversion tools but I can't figure out how to achieve the following .htaccess rules in a web.config file: SetEnvIfNoCase Host my-domain.com nopassreq ...
0
votes
1answer
11 views

Lighttpd: How to migrate a rewrite rule?

i'm using this htaccess rule on a apache: RewriteEngine on RewriteCond %{HTTP_REFERER} example\.com [NC] RewriteRule .* - [F] .. and i would convert it to an lighttpd rewrite rule. How can i do ...
0
votes
1answer
44 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 ...
-2
votes
1answer
54 views

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

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
79 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
1answer
31 views

Should I use robots.txt to block these folders? [closed]

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
63 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
35 views

Configure subdomain godaddy and use an existing CERT [closed]

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 ...
0
votes
2answers
44 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
28 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
19 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
45 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
79 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
46 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
51 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
76 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
63 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
278 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
109 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
51 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
131 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
86 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
85 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
108 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 ...