Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

2
votes
1answer
93 views

htaccess order Deny,Allow rule

I'd like to dynamically add IPs to a block list via htaccess. I was hoping someone could tell me if the following will work in my case (I'm unsure how to test via localhost). My .htaccess file will ...
0
votes
0answers
53 views

Changing the current URL but serving content from another (same domain) - ProxyPass?

I've been banging my head against the wall with this for months now so I hope someone on here will be able to finally advise what is needed for this. I have some URL's like this:- ...
0
votes
0answers
68 views

Rewrite rule Mod_Proxy truncate file name

I search online for the solution, but nothing :(. I write this simple rule RewriteRule ^(.*)$ http://www.mysite.com/$1 [P,NE,QSA,L] In mysite.it i have an .htaccess with this rule and it's ok, but ...
0
votes
1answer
77 views

Redirect Port 80 request to 443 for site

I managed to redirect my requests from port 80 to 443 using the redirect permanent. However, there is a problem. On my page there is a link to /forum/. When one clicks the link it tries to go to ...
0
votes
1answer
35 views

.htaccess rules not working, but the file seems to be loaded

I am trying to remove .php at the end of the URL from any page thats loaded. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php ...
0
votes
1answer
107 views

Redirect one domain to another's sub folder [closed]

I have a domain www.example.com that is shutting down, but I need to forward it to www.newwebsite.com/example/ incase there are any SEO benefits to it. The www.newwebsite.com is hosted on a LAMP ...
0
votes
1answer
32 views

301 redirect on same hosting server

I originally bought the domain http://example.com with a hosting package and have run a Wordpress blog on that for a while. Now I've bought an added on domain http://example.com.au and have ...
0
votes
0answers
14 views

Doubts on 404 because htaccess - What is happening here?

I have a WP instance, and I see that any time I write a URL that has any string that contains 'moz' it errors out with a 404. I have taken a look at my .htaccess looking for 'moz' and I see this: ...
0
votes
1answer
55 views

VirtualHost Redirect should work with new RewriteBase

Inside the VirtualHost I got this redirect: RewriteBase / RewriteCond %{REQUEST_URI} wp-content/uploads/([^.]+\.(jpe?g|gif|bmp|png))$ RewriteRule (.*) http://example.org/$1 [R=301,L,NC] So the full ...
0
votes
1answer
64 views

Apache not responding to configuration changes

I have an Apache server running the latest 2.2 version on Ubuntu 12.04.4 LTS. I haven't changed most of the configuration. Everything worked fine at start, but now it's not noticing any changes to its ...
1
vote
1answer
18 views

.htaccess AuthType not what I expected

I'm working on a new project at work in PhP, and have come across something I'm unfamiliar with/can't find any help with. In the .htaccess file for the directory I see AuthType UWNetID require ...
-3
votes
1answer
57 views

How to block unknown browsers in .htaccess?

I wanted to know that How to block unknown browsers in .htaccess? there is a variable in htacess called : BrowserMatchNoCase but I don not know how to work with it
1
vote
0answers
30 views

.htaccess password protect multi storeview magento

I'm currently working on a Magento site with 2 different domains/2 storeviews in one Magento installation. Let's say we have www.domain.com and www.domain2.com. I want www.domain.com to be ...
1
vote
1answer
389 views

Windows Active Directory Authentication and XAMPP Apache server [closed]

I installed XAMPP server in my Windows 2008 server and I want to restrict access to htdocs folder so only users in active directory could see my intranet website. I enabled following modules in ...
1
vote
1answer
199 views

How to add rewrite rule for redirecting url in Apache Web Server

I am trying to configure autodiscover feature of outlook and thunderbird for my mail server. I have added a virtualhost entry with following rewrite rule to redirect config-v1.1.xml to ...
0
votes
0answers
93 views

Cannot get media type from 'x-mapp-php4' in Apache log file

My Apache error log has the same set of error messages regularly. The particular set of error messages total around 17 lines so I've used Pastebin: http://pastebin.com/UfG3vQtn You will see there is ...
0
votes
1answer
140 views

htaccess redirect HTTP & HTTPS non-www to HTTPS www

How can I redirect my website from all HTTP requests to HTTPS + non-www HTTPS to HTTPS with www.? Example: Redirect HTTP non-www, HTTP www. & HTTPS non-www: HTTP:// example.com/ && ...
0
votes
1answer
30 views

htpasswds loads site after failed authentication

I'm having an issue with htpasswds on a dedicated server with cpanel/whm where the visitor can simply click the "cancel" button several times on the htpasswds pop up and it will load the site but ...
1
vote
1answer
121 views

.htaccess Rewrite Rule not rewriting alias

I am attempting to serve up a different robots.txt for alternate subdomains that I am using for domain sharding so that google doesn't index m1.example.com and m2.example.com. ...
0
votes
1answer
41 views

How to change image folders and domain with mod_rewrite?

I have images like this - http://www.site1.com/upload/long/long/long/long-path/image.jpg I need redirect all images in folder upload to another site and strip path. Example ...
0
votes
1answer
53 views

Change the value of MaxRequestLen via .htaccess?

Is it possible to change the value of MaxRequestLen without root access to my Apache 1and1.co.uk dedicated server (managed version)? I was hoping to be able to change the value via .htaccess? Does ...
-1
votes
1answer
76 views

Rewrite only if Image don't exists with .htaccess

How do I make RewriteCond+RewriteRule change site1.com/folder1 to site2.com/folder1, only if file in this directory don't exist. For example: site1.com/wp-content/uploads/2014/03/image.jpg If image ...
-1
votes
1answer
38 views

Point a new domain at existing files but keep new domain url

I have a directory: http://mysite.com/somedir/ I have a new domain: http://myothersite.com I want my new domain to point to the files in http://mysite.com/somedir/ but retain it's own url. So that a ...
-1
votes
1answer
27 views

Disable custom php.ini

I want to disable custom php.ini inside my shared hosting. I dont want to allow my clients to use it. I could block the usage of htaccess using allowverride but I cant see someway to block php.ini!
0
votes
0answers
12 views

htaccess redirect after changing a string [duplicate]

My website is www.niresh12495.com recently i have changed my url pattern Previously http://www.niresh12495.com/page/apple/articles/what-is-hackintosh-for-beginners-and-noobs-r43 Currently ...
1
vote
2answers
122 views

.htaccess redirect visitor if he has a cookie is from accounts.google.com [closed]

I am creating a gateway page that redirects visitors based on what services they are using. How should a .htaccess rule that redirects a visitor if he has a cookie originating from the domain ...
-1
votes
1answer
44 views

Mod rewrite htaccess worked on old server, not on new server

I have the following .htaccess file, which worked fine on my old host. I moved over to an AWS instance (Ubuntu 12.04 LTS), and it's no longer completely working: <IfModule mod_rewrite.c> ...
0
votes
1answer
150 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. ...
1
vote
0answers
45 views

Password protect website

I'm trying to password protect my website from ONE ip address. I just want to restrict an ip from accessing my website, but still allow them to access it if they have the password. My current code ...
0
votes
1answer
41 views

Apache Require env is ignored

I have following simple directive in .htaccess, I like to allow access by env, condition: SetEnv ABC 1 <RequireAny> Require env ABC </RequireAny> Seems to me very simple, but Access ...
1
vote
1answer
184 views

Nginx htaccess rewrite specified folder

I tried to convert this htaccess rules to nginx: apache # Necessary to prevent problems when using a controller named "index" and having a root index.php # more here: ...
0
votes
0answers
156 views

Redirect only /index.php page and allow access to all sub directories

I'm running ExpressionEngine (www.mywebsite.com) as the root of my website and Magento in a sub directory (www.mywebsite.com/store) I'm trying to redirect the Magento homepage (and only the homepage) ...
-1
votes
1answer
151 views

Block certain requests starting with specific string using .htaccess in apache

54.215.234.39 - - [02/Apr/2014:10:51:35 -0400] "GET /ProductSearch.aspx?qs=94307 HTTP/1.1" 404 11414 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0" I am ...
0
votes
1answer
73 views

Best way to optimize site speed for a large traffic website? [closed]

I'm currently managing a Website for a client of mine who gets about about 500-1000 visits minimum a day, and this includes Members uploading videos, photos, blog posts and other content. The site ...
0
votes
1answer
149 views

Redirect logged-in users to https, anonymous to http using Varnish+Apache

I've got a server with Varnish in front of Apache in front of Drupal. What I'd like to do is redirect my login form to https (easy enough), then redirect all logged-in (authenticated) users to https ...
1
vote
1answer
65 views

apache change proxy request url rewrite

I have problem with proxy requests. I need to enable apache mod_proxy for my subdomains but i forgot to set Allow from mydomain.com, it was Allow from all...Yes, i created open proxy for all world... ...
0
votes
1answer
26 views

Serving from different directories for Internet Explorer

We have two different versions of our website - one for older versions of Internet Explorer (7 and 8), and one for all other browsers. (arguments around JS feature detection have been made, but we ...
-2
votes
1answer
48 views

Where to save nginx rewrite rules? [closed]

I am thinking about replacing apache webserver with nginx but some websites use .htaccess file and I want to ask... it is possible to declare rewrite rules inside website directory and not in server ...
1
vote
1answer
55 views

How to secure open journal system original submission files

I have installed ojs in my own server. In the installation process, it is required to create a folder that is writable by php (apache = www-data), but not accessible from the browser. The folder is ...
0
votes
1answer
49 views

htaccess redirectmatch all of 1 type of file in all subdirectories under a certain level

I need to redirect jpgs (that don't exist any more) that scummy picture crawler sites are still trying to access from the picture directory on our old site. RedirectMatch 301 (?i)/Portals/5/.jpg$ ...
0
votes
1answer
69 views

Blocking request with query string

I'm an under a DDoS attack though I have cloud flare.. I found out that the attacker is accessing the server using query strings "?a=randomnumber" I don't use query strings in my website so I need ...
-1
votes
1answer
42 views

What's the RewriteRule in htaccess to redirect to a different port? [duplicate]

I want to redirect all the request like url/api/something to a different port (say 8000) with the same base URL RewriteCond %{REQUEST_URI} ^/api/\w*$ [NC] RewriteRule ? What is the RewriteRule? ...
0
votes
2answers
59 views

Can Apache be configured to ignore corrupt .htaccess files but respect them if they are correct?

I have a program writing and updating some RewriteRules in an .htaccess file (the main config is in the vhosts section). This works fine most of the time, but sometimes the file gets corrupt. When ...
-1
votes
1answer
39 views

apache disable unconfigured subdomains [duplicate]

There is a webserver which has example.com, www.example.com, my.example.com, shop.example.com, static.example.com. All sites except www.example.com is on https. My problem is when I type ...
1
vote
0answers
18 views

RewriteBase in httpd.conf + RewriteRule in .htaccess? [duplicate]

RewriteBase is set in httpd.conf for an alias: Alias /test /home/user/test <Directory "/home/user/test"> AllowOverride All Allow from All RewriteEngine On RewriteBase /test ...
-1
votes
1answer
68 views

Block Wildcard User-agent

how can i write rewrite condition for wildcard user agents here is the code I'm trying but doesnt work RewriteCond %{HTTP_USER_AGENT} !*uTorrent* [NC] RewriteCond %{HTTP_USER_AGENT} ...
0
votes
1answer
131 views

htaccess to Allow Downloads from Specific User agent and HTTP Referrer [duplicate]

i want to allow some files to be downloaded if only the user agent or referrer match the following These are the user agents uTorrent *Bittorrent* Transmission This is the http referrer ...
1
vote
1answer
59 views

Apache2 htaccess issue [duplicate]

I'm currently having issues with getting Apache2 to recognize an .htaccess file. I'm currently running the server locally on my machine for testing purposes. I can get my index page to load up ...
-1
votes
1answer
71 views

Apache htaccess get subdomain and prepend it to path [duplicate]

this is my first question on ServerFault and I think I couldn't find a similar one. To the point. I would like to achieve the following using my .htaccess. subdomaina.example.com/stats/ -> ...
1
vote
0answers
68 views

403 error from 403 ErrorDocument

I've the following configuration script in my Apache 2.4.7 installation: <Directory "/www"> Options Indexes FollowSymLinks AllowOverride All <RequireAll> Require all ...