Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
1answer
18 views

Redirect rules for .htaccess with mod_rewrite

I have a PHP script dynamically generating content from a database based on queries. The user might do a search from a text box for the username "mark". The content is provided by PHP at ...
0
votes
0answers
5 views

Ganglia private page

I have read the Ganglia documentation about authorization systems (https://github.com/ganglia/ganglia-web/wiki/Authorization-System). I would like to restrict all access to the page via htaccess so ...
0
votes
1answer
15 views

How to hide main domain in Shared Hosting account [on hold]

I have an economy hosting plan with godaddy that allows me to host additional domains. For example, if my main domain is example.com, I can create a folder at example.com/newdomain and point ...
0
votes
2answers
963 views

Server, Database or Code Issue? Magento backend rewrites itself with a index.php which doesnt work

I will be honest and admit my cross posting in magento.stackexchange.com but the reason is that I believe it is a server fault, and now I am looking for proof to present to my dreaded hosting ...
-1
votes
0answers
8 views

Hosting htaccess Subfolder to Domain [closed]

I get a simple hosting plan with a few domains. Now I create a subdomain like sub.domnain.com. Now I select the folder which should be the root for the domain. If I do that I get following domain ...
4
votes
1answer
3k 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 ...
2
votes
1answer
69 views
+100

Apache security - list all possible handlers / actions

To ensure there aren't security weaknesses that can be exploited via .htaccess, how can we see all possible handlers that Apache can use via directives like SetHanlder and AddHandler. I know I can ...
1
vote
2answers
261 views

How do I replicate my .htaccess functionality in NGINX

I have the below .htaccess file in apache that redirects all request to app/index.php with or without a GET parameter. I just installed NGINX and my application won't run. Can anyone assist in ...
0
votes
1answer
2k 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 ...
0
votes
1answer
2k views

Apache, Reverse Proxy, Rewrite, HTTPS

I am creating a Reverse Proxy box with apache and i have some questions about that: How can i load some files, say robots.txt, off the reverse proxy box instead of the actual host? Would it be wise ...
1
vote
0answers
15 views

How To Stop Apache Logging Client Denied By Server Errors [duplicate]

I get an annoying amount of spam traffic from the Ukrane, Russia, Korea etc. I have setup rules in my .htaccess file to block all of these countries and it's working great. The problem i have now is ...
0
votes
0answers
25 views

Converting NGINX to apache rewrite rules

Currently I am doing a project setup in my local(Apache) whichi is in NGINX. I am facing trouble in converting the rules from NGINX to .htaccess rules. Can some one help me out in converting the ...
0
votes
1answer
2k 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 ...
1
vote
2answers
43 views

How to block Ip in .httaccess on Apache 2.4

I've upgraded Apache 2.4 and would like to block an Ip this could be done by using the following in the .httaccess on Apache 2.2 Order Deny,Allow Deny from 50.62.136.183 However how can I achieve ...
0
votes
1answer
20 views

Some mod_rewrite syntax clarification

We inherited some code recently and I'm reviewing the .htaccess file of one of the sites. I understand what the end result of most of the rewrite rule sets are, I'm just unsure of some of the syntax. ...
0
votes
1answer
19 views

Convert htaccess rewrite rule

I want to convert this to nginx rules # BEGIN EAP Rewrite <IfModule mod_rewrite.c> RewriteEngine on Options -Multiviews RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f ...
0
votes
0answers
4 views

Parallels Plesk Apache dedicated server shared IP / A Address serving default page [migrated]

My Website Works when you go to it, however Google Adwords is telling me that my site is redirecting/ not showing up properly to their bots. When you put the site into a website checker like GT ...
1
vote
1answer
28 views

htaccess rule to rewrite %3F to ? and %3D to =

I need to rewrite the URL of my site which contains %3F to ? and %3D to = I have tried this rule: RewriteCond %{HTTP_HOST} myhostname RewriteRule ^(.*)%3F(.+)%3D(.+)$ $1?$2=$3 [L,R=301] ...
0
votes
2answers
877 views

Blocking referring domains via httpd.conf

I'm using the following code to block referrer spam on a site which is receiving a huge volume of spam traffic. I'm told that it is more efficient in terms of server load to use httpd.conf, but I'm ...
-1
votes
1answer
41 views

Block all bots from .ru domains via robots.txt or htaccess? [closed]

Is there any way to write rules for robots.txt or htaccess that will block all bots that come from a .ru domain? Thanks
5
votes
1answer
2k views

Apache sends plain-text response when accessing SSL-enabled site without HTTPS

I've never encountered something such as this before. I was attempting to simply redirect the page to the HTTPS version if it determined that HTTPS was off, but instead it's displaying an HTML page ...
0
votes
0answers
16 views

Combine modrewrite condition to avoid double redirects

There are two modrewrite directives in my htaccess file. One is redirecting uppercase URLs into lowercase. The other one is redirecting http and www requests to https and none www. #Redirects ...
0
votes
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 ...
1
vote
3answers
3k views

Apache SetEnvIf failing to match Request_Uri

Simple condition, which never match and set variable: SetEnvIf Request_URI "^/path/to/something*" access_granted Checking URI by using PHP is giving correct string, however variable is never set. ...
0
votes
4answers
2k views

Faster Option: Redirect via PHP to PHP or Apache mod rewrite redirect to PHP?

I want to determine if using Apache's .htaccess mod rewrite is a faster way to redirect to a PHP file, compared to redirecting from one PHP file to another, using the header redirect core function of ...
2
votes
1answer
942 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 ...
1
vote
3answers
13k views

Redirect all http AND https non-www URLS to https://www.example.com via htaccess

For reasons much too long and complex to get into (it involves several layers of corporate red tape resulting in someone else not purchasing a wildcard SSL certificate I requested), I have to set up a ...
-1
votes
1answer
32 views

apache 2.2 order deny allow not working

this is driving me nuts. In a web server running httpd-2.2.15-45.el6.centos.x86_64 any type of does not seem to be honored. Example: <VirtualHost 192.168.10.10:80> ServerName ...
0
votes
2answers
969 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
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 ...
1
vote
1answer
17 views

How to execute script before Apache basic auth?

I need to protect some location with htpasswd and that is working ok with: <Location /myloc> AuthType Basic AuthName "My Protected Area" AuthUserFile .htpasswd Require ...
0
votes
0answers
24 views

Does domain pointer overrule .htaccess redirect from country tld to .eu tld or is there workaround?

I've been trying to redirect with a .htaccess file but its not working. Now I think I know why, just need a second opinion. I have domain pointers set from a .nl domain and a .lv domain to point to ...
1
vote
1answer
33 views

Authorization Required! – 401

We have a weird problem and we can't figure out what's causing the issue. Randomly, some of our visitors get the following error: Authorization Required! – 401. This server could not verify that ...
0
votes
0answers
17 views

Apache ErrorDocument fails for subdirectories

I'm using the following in an .htaccess file to allow only traffic from my ip, i.e. put the site in maintanence mode. ErrorDocument 403 /maintenance.html Order Allow,Deny Allow from 11.22.33.44 It ...
-1
votes
0answers
12 views

301 redirect not working as expected [duplicate]

i've set some redirects in my htaccess file, this is what i got so far: RewriteEngine On Options +FollowSymLinks Redirect 301 /products http://www.newdomain.com/sm/folder/ the old ...
-1
votes
0answers
8 views

I need a .htaccess RewriteRule that converts a query to a directory structure [duplicate]

I need this: http://website.com/page/request.php?id=1 To look like this: http://website.com/page/1 Ive already tried this but it does not work. RewriteRule ^=([^/d]+)$ request.php?id=$1
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
1answer
20 views

Apache keeps returning 500

(Im working with Apache/2.4.10 on Windows 7 (64 Bit) ) I have a directory "test" in my document root with several files on my local apache: test |____.htaccess |____.htpasswd |____admin.php ...
-2
votes
1answer
29 views

Equivalent of .htaccess in NGINX

I have the following .htaccess file. I am trying to configure this on NGINX with no luck. .htaccess RewriteEngine On RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond ...
1
vote
1answer
15 views

How can I force mod_rewrite to send user info component of a URI?

A colleague recommended I repost this from StackOverflow to ServerFault: This has been driving me crazy. I have a web application that's being served via Apache Web Server. The database server that ...
0
votes
0answers
12 views

Can't redirect HTTP to HTTPS for subdirectory [duplicate]

The following code (in my root level .htaccess file) should redirect http://www.pillerdesigns.com/iwp/ to https://www.pillerdesigns.com/iwp/ (non-SSL to SSL): RewriteCond %{HTTPS} off RewriteCond $1 ...
1
vote
1answer
49 views

Redirect IP to a domain name using htaccess

Let's say I have this IP Address 11.12.13.14 and the domain example.com. Now what I want is to redirect the user from IP Address to domain name (but without changing the domain name to address bar). ...
0
votes
0answers
12 views

Set 1 cookie on 2 different subdomains

I am trying to get one cookie to work with 2 domains. Currently using an agreement page once a users first views the website that it will come up and they have to accept the ToS to continue, however ...
0
votes
1answer
84 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 ...
-1
votes
1answer
22 views

how should I 301 redirect https address to http address?

I have recently moved my website to a new domain. The previous domain had SSL installed and it was https://example.com. My new domain is http://newexample.com and It doesn't have SSL on it. I used ...
0
votes
0answers
23 views

Combining .htaccess with http.conf to set https and direct all routes to index.php

I'm sure this question has been asked before, and I have tried to understand many of the answers given, however none of them seem to work with my particular set up. If the question can be answered ...
0
votes
0answers
40 views

404 Not Found or 500 internal server error using nginx try_files configuration

I'm trying to move my project from Apache to nginx. I use WT-NMP. I'm converting .htaccess to nginx configuration by adding this in nginx.conf. location / { try_files $uri $uri/ /index.php/$args; ...
1
vote
2answers
8k views

How to redirect example.com from HTTPS to HTTP, then HTTP example.com to newdomain.com?

As of now I use this rule (in .htaccess of example.com) to redirect HTTPS/HTTP example.com to newdomain.com: Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://newdomain.com/$1 ...
-1
votes
1answer
64 views

Laravel: default route will render but others will not. Ubuntu/14.04 / Apache2 configuration issues? Not sure what I am doing wrong

Laravel will render the default / root page normally. but will not render default routes or error pages. My web browser will return with Apache (NOT Laravel) error pages with I try and access /test ...
0
votes
0answers
14 views

htaccess redirect with regular expression [duplicate]

Some redundant pages are being created in the website. Eg, archives/volume41/number21/calls- archives/volume52/number19/calls- archives/volume66/number7/calls- archives/volume70/calls- ...