Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
15 views

htaccess redirect loop only on one of two servers

I have a web app installed on two servers. On one of the servers, when I'm accessing the homepage I get the "Error code: ERR_TOO_MANY_REDIRECTS" error in the browser while on the other one everything ...
0
votes
1answer
23 views

Blocking UserAgent libwww-perl with .htaccess not working?

The server is running on Apache, and trying to block libwww-perl, but not sure why it's not working. I've put the following in my .htaccess, but when I run the test I still get the notification that ...
1
vote
0answers
6 views

Enable/allow Proxy From Different Server With SSL

I have a node.js app on server A (http://sub.domainA). My customer wants to use this solution without redirecting. The configuration in .htaccess for the node.js service on server A looks like this. ...
0
votes
1answer
20 views

Block an http referrer on the server level

I am seeing multiple fake http referrers to several sites on my server, which for the most part doesn't bother me, except that they distort visitor stats. I have filtered the questionable domains out ...
-1
votes
0answers
9 views

Redirecting to https gives an error

I recently bought an SSL certificate. When trying to access my website with https://... it works fine. I'm using Codeigniter and want to redirect från http:// to https:// in the .htaccess file. I have ...
-1
votes
1answer
13 views

Godaddy .htaccess and mod_url

I'm an experienced full stack developer and freshly minted webmaster. Recently my client asked me to create a redirect from one url to an outside page. I know how to make a page redirect and I'm ...
0
votes
0answers
24 views

.htaccess multiple rewrite rules .php & .html

I'm pretty new to editing .htaccess and I'm still trying to get a grasp of what to do. I currently have the following code: Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f ...
-2
votes
1answer
13 views

How to redirect between Wordpress site using .htaccess if the origin has .html [closed]

How to redirect between Wordpress site using .htaccess if the origin has .html the first site i use permalink .html example: www.domain.com/articles/content.html if i'd like to use 301 redirect to ...
0
votes
1answer
73 views

How To Force Rewrite and Redirect Url [duplicate]

I have a url: http://domain.com/i.php?c=PT and I Rewrote it to http://domain.com/PT successfully. But When I browse http://domain.com/i.php?c=PT, it wont redirect to http://domain.com/PT. Is there ...
0
votes
2answers
15 views

rewrite www.mysite.com requests to www-staging.mysite.com with .htaccess

I have a staging and production Apache server. To access staging I just go to www-staging.mysite.com/a/sub/directory. To access production, just remove the -staging in the www. Currently, all the ...
0
votes
1answer
28 views

htaccess: get request domain for mobile redirect

We have a mobile site that is served using multiple domains. We want to redirect users who are using desktop user agents to our desktop sites while preserving the original domain the user used to ...
1
vote
0answers
29 views

Special nginx hotlink protection conversion from Apache .htaccess rule

I have the following anti-leeching rewrite rule in Apache, which i'd like to have in nginx. I see cookie or referrer rule examples. But none combining both, so I am not sure how to go about this. ...
2
votes
2answers
150 views

Apache http to https redirection [duplicate]

I'm using below .htaccess rule to redirect all http requests to https. RewriteEngine On RewriteBase / RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} And it's working ...
0
votes
2answers
25 views

Restrict Location Match by IP via .htaccess

I have a url path defined in rewrite rules ('/admin') which I would like to restrict access to only 1 ip address. I'd image the best way would to use .htaccess rather than coding it in. I've tried ...
0
votes
1answer
22 views

Rewrite rule for specific domain with language (domain.de, domain.com etc.)

I have web application which is accessed via two URLs: domain.com/en/param/param domain.com/de/param/param Is it possible to create a virtual host for a language-specific domain like ...
2
votes
1answer
33 views

htaccess regex not processing URLs properly

I'm trying to redirect (or 'rewrite') over 3000 urls for a site where we updated the SEF of most of the content pages to remove an ID number that was not needed/desired. This should be a simple ...
-1
votes
0answers
26 views

How to implement reverse proxy using .htaccess file

I need to implement reverse proxy using .htaccess for a blog site that is on another server from main site server without changing the main site's url in IIS 7. I have used reverse proxy by Helicon ...
0
votes
1answer
44 views

.htaccess file is not working on Apache 2.4.12 and Windows Server 2008 R2

I am trying to add Authentication window to a section of the site using .htaccess file. But It is not working "the site is acting that the ".htaccess" files does not exists. here is that content of ...
-1
votes
1answer
20 views

can i .htaccess rewrite an url to subfolder if it is one of two alias domains?

two domains point on one and the same webapplication on my server. but when I use the http://domainA.tld it shall point to http://domainB.tld/service but it shall not be a riderict and the address bar ...
-1
votes
0answers
18 views

.htaccess to redirect phone users to different photos folder not working?

I realize there are numerous similar questions. I have checked them and can't figure out where the problem is. I have a large directory of small-for-phones photos ("mobile") using the same ...
1
vote
0answers
23 views

Use custom environment properties from Elastic Beanstalk for htaccess

Is there a way to use the custom environment property of elastic beanstalk in htaccess? I only want to rewrite http to https when not running locally so I thought I could do this by using the ...
0
votes
1answer
35 views

mod_rewrite not acting as expected — missing path info

I've just installed a fresh apache (Apache/2.4.7 - Ubuntu) and created and enabled a site with a Document Root of /var/www/html. With mod_rewrite enabled, I proceeded to create a simple .htaccess file ...
0
votes
0answers
23 views

How do I accomplish Drupal “double gzip” prevention in Nginx?

There is this section of the default .htaccess that Drupal ships with: # Serve correct content types, and prevent mod_deflate double gzip. RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1] ...
0
votes
1answer
16 views

Apache AllowOverride Based on Directory

Background Small team(4 people, 2 devs, 1 server admin, director) Three internal applications, one per server. httpd.conf is set to AllowOverride None on / None of our team members are accustomed to ...
-2
votes
2answers
34 views

Remove ?m= string from urls

I have urls like site.com/gallery/var/resizes/somename/somename1/somename2.jpg?m=somenumber would like to remove the ?m=somenumber part from urls and simply show ...
0
votes
1answer
13 views

A special rule for a directory in .htaccess

I have this .htaccess file: RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?p=$1 [QSA] I'd like to create an ...
1
vote
1answer
120 views

Apache 2.4.9 on Debian 7.8 - .htaccess options not allowed

I’m part the team that administrates a Apache 2.4.9 web server running on Debian 7.8. We’re having an issue with one of our users website: www.example.com/~user When we try to access this URL, a ...
0
votes
0answers
38 views

Total DNS errors 100% in openshift

From yesterday suddenly my website down and Google webmaster shows Total DNS errors 100%. My app is http://core-ahang2mail.rhcloud.com I don't know what should I do, Could you please help me? ...
0
votes
1answer
47 views

Robots file behaviour

I've noticed something odd today. if i go to http://www.google.com/robots.txt, IE11 shows me the contents of google's robot file. However if i go to my site (still in development) using the same ...
0
votes
2answers
14 views

how to write RewriteCond for a url with subdomain

I am trying to ban some bots by writing a RewriteCond rule in htaccess file. Is the following ruleset correct if I add the following: ## block traffic from particular referrers RewriteEngine On ...
-3
votes
1answer
56 views

Why same request for hundreds times in access log

I don't know what comes to this, and how to prevent it. Look at the time, it keep on with the same request for hundreds times. Not just those particular IPs but some others too. How do I prevent this. ...
1
vote
1answer
33 views

Apache2.4 mod_rewrite won't redirect me to subdir based on visiting domain

I have an Apache2.4 server with public dir in /var/www/html. In that dir I have a Wordpress site with this .htaccess: RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f ...
0
votes
1answer
47 views

Using nginx or mongoose or mongrel or other tiny web server, how to serve certain files from subdirectories as from one root or top level directory

I have a directory structure let's say of /user/me/project1 /usr/me/project1/private/stuff /usr/me/project1/whatever/bla/bla /usr/me/project1/pdf/bla.pdf /user/me/project2 /user/me/project2/priv1 ...
0
votes
1answer
25 views

outlook trying to access image through webdav in email signature

I have an html email signature and 1 image on it which is hosted online. In Outlook 2010 it tries to get this through webdav which at atimes to users can take a while, once it fails then it gets it ...
-1
votes
0answers
12 views

How to show two categories before title in url using .htaccess [duplicate]

In my .htaccess file i am using this line given below to show url like this (http://localhost/mysite/top-5-home-business-in-the-world). "top-5-home-business-in-the-world" is the title. RewriteRule ...
0
votes
0answers
54 views

amazon ec2 - opencart seo url not working

I have installed opencart on my amazon ec2 server. I am trying to activate the seo url feature but it is not working. I have renamed .htaccess.txt to .htaccess in folder directory ...
2
votes
1answer
30 views

Apache - protect a subdirectory but not the root

I have a website, it should be accessible by anyone, but one directory should request http authorization. I have added following lines to website.conf: <Directory ...
0
votes
2answers
79 views

Redirect loop when forcing HTTPS

I am using the following to force HTTPS on my main website. ### Force SSL RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] If you want to view the full htaccess ...
0
votes
1answer
86 views

why apache returns error message in body while returning 200 status code

I've configured Apache to return 200 on all requests that made with OPTIONS verb: RewriteCond %{REQUEST_METHOD} OPTIONS RewriteRule ^(.*)$ $1 [R=200,L] The Apache indeed returns status 200 OK, yet ...
0
votes
1answer
75 views

why Apache's setEnvIf doesn't set correct header and how to debug it

I have the following in my .htaccess file: <IfModule mod_headers.c> SetEnvIf Origin "http(s)?:\/\/(www\.)?(inreado\.local|testenv\.inreado\.com|inreado\.com)$" AccessControlAllowOrigin=$0$1 ...
0
votes
1answer
32 views

Setting Expires Headers for Things Retrieved Via Query String

I have an installation of MediaWiki and have been optimizing various aspects using Google's PageSpeed tool as a guide, and I've so far been able to make lots of improvements. One thing I'm not able ...
1
vote
1answer
30 views

Specify which directores to look for .htaccess file

I'd read that enabling .htaccess for all directories causes a performance overhead, because all subfolders are also scanned for .htaccess files. I'd like to only have the .htaccess file read in: ...
0
votes
0answers
27 views

Rewriting .htaccess for https on subdomain

I'm currently hosting subdomain dev.example.com from a dev subfolder and using this .htaccess rules: RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?dev.example.com$ RewriteCond %{REQUEST_URI} ...
0
votes
0answers
15 views

Disable gd library on a specific website

I am trying to disable gb library on a specific website so it won't affect the other websites which are hosted on the same server. Is it possible to do this with htaccess or is there another way?
0
votes
0answers
11 views

Apache mod_rewrite with proxy to HTTPS from HTTPS host

I am trying to use the mod_proxy to rewrite internal one URL to another in this way: RewriteCond %{HTTP_HOST} ^www\.domain\.de$ RewriteCond %{SERVER_PORT} ^443 RewriteRule ^blog/(.*)$ ...
0
votes
2answers
34 views

Setting htaccess rule for nginx

Hi i m having issue while setting htaccess rule in nginx. My htaccess is : htaccess rules are: RewriteEngine ON RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* ...
0
votes
1answer
60 views

Mod_rewrite Underscores to Dashes (or Hyphens) in Opencart

I'm transferring an e-commerce site to a new shopping basket. For some reason the old site used dashes for categories but underscores for products. So the full url of a product looks like this: ...
1
vote
1answer
34 views

Apache .htaccess - how to rewrite referrer?

I have a site www.example.com. I would like to achieve the following: All the visits that click on www.example.com from my other site www.example.net, to have the referrer www.example.org. In other ...
1
vote
1answer
23 views

.htaccess equivalent rules?

To prevent access from other sites (hotlinking) or direct access (typing an URL) are the .htaccess rules below equivalents? RULE 1 <files myfile_one.php> order allow,deny deny from all ...
-1
votes
1answer
28 views

Apache: deny acces to directory but allow 1 file

I am using Apache 2.2.22 on Ubuntu 12.04. I need to disable access to directory /var/www/abc/ but allow access to file inside this directory /var/www/abc/README.txt. I try: <Directory ...