Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
0answers
14 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 ...
2
votes
1answer
196 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
41 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
21 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
117 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
72 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
17 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
267 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
140 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
54 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, ...
2
votes
1answer
167 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
497 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
1answer
21 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 ...
0
votes
2answers
62 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
16 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
431 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
102 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
109 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 ...
-1
votes
2answers
68 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
40 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
54 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
35 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
25 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
97 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
2answers
312 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
53 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
68 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
132 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
102 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 ...
1
vote
2answers
766 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
185 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
78 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
276 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
1answer
244 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
305 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
55 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
122 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
87 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
27 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
41 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
111 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
298 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
61 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
62 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
vote
3answers
637 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
94 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
84 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
90 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
43 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
64 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 ...