Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

-1
votes
1answer
13 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 ...
0
votes
0answers
7 views

Symfony2 rewrite localhost/subdir/web/app.php/action to localhost/subdir/action

I'm try to use my Symphony 2 project without /web slug in URL. I'm add the .htaccess file to my root folder localhost/subdir <IfModule mod_rewrite.c> Options +FollowSymlinks ...
0
votes
0answers
18 views

Wordpress 301 redirect loop [on hold]

I have wordpress site hosted on openshift say example.com. I am redirecting example.com to www.example.com (non www to www). I have created alias for www and non www version and updated my cname with ...
0
votes
2answers
17 views

Allow user access to FTP account folder based on his current (static) IP

I have an FTP account for a folder (shared hosting on Linux (CentOS) with cPanel) which is accessed through FileZilla (could be a different FTP App) on a PC using Windows 8.1 OS. I would like to give ...
-1
votes
0answers
42 views

Block Aggressive/Incoherent Bot? [duplicate]

I have a weird bot pummeling my site. It COULD be some sort of low-level denial-of-service attack, but I think that's unlikely. More likely script kiddies. I'm looking for suggestions on blocking it ...
0
votes
1answer
18 views

PHP scripts fail after adding .htaccess to password protect a dir

I added .htaccess and .htpasswd to a dir in order to password protect it. That part works. AuthType Basic AuthName "Password Protected Area" AuthUserFile /path/.htpasswd Require valid-user But ...
-1
votes
1answer
30 views

.htaccess rewrite rule, extract number to query variable [duplicate]

I'm migrating a huge site from an old proprietary CMS to WordPress and need to redirect the old URL structure. The old system has all kinds of whacky URLs, but the one thing common to them all is ...
-1
votes
0answers
22 views

Is there a way to test if my htaccess file is even working? [closed]

Is it possible to intentionally 'break' it? I'm not sure if the host I'm using is configured in such a way that it is being ignored.
0
votes
0answers
14 views

how to serve a single page application with openshift

I'm tryng to deploy a single page app on openshift. On openshift all the static contents have to be in wsgi/static dir, but I obviously want to serve my static index.html from the root. Every attempts ...
0
votes
0answers
6 views

RESTful Webservice: .htaccess linking to higher level hierarchy [duplicate]

I have this RewriteRule for apache: RewriteRule ^locations/([0-9]{1,})$ index.php?id=$1 It is positioned in public.www/medmec-api/.htaccess and the rule does work for ...
0
votes
0answers
11 views

Dynamic Subdomain with htaccess unchanged URL

I have a Codeigniter project Located at "domain.com/users/abc" directory. I want to access it with Subdomain "abc.domain.com/" and also I don't want the url in the address bar to change. There will ...
0
votes
0answers
14 views

Openshift wordpress non www to www redirect via .htaccess [duplicate]

I am running wordpress on openshift, i want to make non www to www redirect. I have read this answer. I have added .htaccess file into .openshift/config directory. My .htaccess contains following ...
-1
votes
1answer
31 views

Recommended sequence for directives in htaccess?

Thanks in advance for comments and suggestions. My wordpress site was hacked so I deleted it and started from scratch beginning with a proper htaccess document. As I was configuring the htaccess ...
2
votes
0answers
21 views

htaccess deny form all wp-login.php blocks “most” adresses but not all

One of my sites has been hacked recently. To make it short, i had an old version of wisiya newsletters running wich was used to upload a few files in the wp-content directory. Since then a lot of ...
0
votes
0answers
2 views

htaccess to redirect blog but not attachments

I have a wordpress blog which moved from the directory /blog to the root directory. I would like to redirect the entire directory to the new blog which is now /category/blog The problem is that ...
0
votes
0answers
25 views

mod_rewrite path info postfix and per-dir prefix

There's an issue with .htaccess configuration. I just need the url /category to match the category.php script, but when I try to open this url, there's a 404 error instead. Here's my .htaccess: ...
-1
votes
1answer
24 views

New domain and HTTPS redirects [duplicate]

I have a domain.co and just bought domain.com and want to use SSL on it. Having in mind this H5BP apache config for HTTP to HTTPS redirect: <IfModule mod_rewrite.c> RewriteEngine On ...
0
votes
0answers
30 views

Unable to redirect Https to http using htaccess

I'm trying to redirect https://example to http://www.example.com. I just migrate from one provider to another and my website on google search are index as Https , when I visit the page I get : ...
0
votes
0answers
45 views

What am I doing wrong in this code?

I want to redirect any request, adding a ".php" at the end of the request URI. But, if the URI has a slash ("/") at the end, I want to remove it and add .php at the end of the URI. The code below ...
0
votes
0answers
5 views

htaccess rewrite rule for subdomain results to redirect loop [duplicate]

Below is my htaccess config: RewriteEngine On # if the domain starts with "apply." # i.e. apply.example.com # redirect to application URI RewriteCond %{HTTP_HOST} ^apply\. [NC] RewriteRule ...
0
votes
1answer
16 views

Moved an old wordpress site to another folder on the server, but it is still redirecting even though there is no .htaccess file

My friends site got some malware or something, so he decided to stop using wordpress and have me build his website from scratch. I have never used wordpress in my life, but I FTP'd into the root ...
-1
votes
1answer
31 views

Setting a custom value to the DeflateBufferSize results in 500 internal server error

I'm trying to reset the DeflateBufferSize directive like so in my .htaccess file: DeflateBufferSize 1024 SetOutputFilter DEFLATE But the result of each page is then 500 internal server error (this ...
0
votes
0answers
17 views

How to enable deflate compression for files?.ht

I am hosting my website on Godaddy. How do I enable compression for CSS and JS files? To compress JS and CSS files I am placing the following snippet in the JavaScript directory: SetOutputFilter ...
0
votes
0answers
21 views

Supersede the default Apache config on a different config file

I'm using Ubuntu with Apache 2.4. The config file for Apache is found at /etc/apache2/apache2.conf at the end of this config file it's written # Current File: /etc/apache2/apache2.conf <Directory ...
0
votes
1answer
48 views

Htaccess, allow ip, deny ip and prompt for other

I have a list of ip which doesn't require login prompt ... I have a list of banned ip ( no prompt juste deny access ) But i need a prompt for all others ip ... I tried this : AuthType Basic ...
1
vote
1answer
14 views

URL rewriting a specific directory

I want to rewrite the URL when receiving a request that is not a file and either for directory subdir or not a directory at all. E.g. (!file) && ( (subdir ) | ( !directory ) ) Here's my ...
-2
votes
2answers
94 views

How to set custom $_SERVER variable for PHP

I'm working on a PHP web app which ALSO has some command line tools. I need the command line tools to detect the environment so that they connect with the correct DB credentials etc. The web app does ...
0
votes
1answer
34 views

.htaccess not working on ubuntu 14.04

Here is relevant code from 000-default.conf: <Directory /var/www/html/> AllowOverride All </Directory> But when I put a .htaccess even with nothing in it every site except for the ...
0
votes
1answer
54 views

mod_rewrite in .htaccess and basic auth in vhost - access to paths

I want to lock down a website (made on Drupal) with basic auth. Drupal is using mod_rewrite in its .htaccess file. The problem I'm facing is this - my virtual host looks like this: <VirtualHost ...
1
vote
0answers
10 views

.htaccess redirect keeping url when there is wordpress code involved [duplicate]

I have two domains, alfa.com and beta.com. Beta.com points to alfa.com subdirectory named "ae" by following htaccess-file. It works fine, but what should I add to code to keep beta.com URL and not ...
1
vote
1answer
49 views

How to include local settings in an .htaccess file that is shared between different servers?

I am running a small network of web servers (Apache 2.2/2.4) using essentially the same CGI infrastructure on different machines (and under different domains). The function of each site depends on ...
0
votes
0answers
130 views

wordpress 4.1 force http intp https with .htaccess

I would like to force https with correct Comodo Certificate, in the website www.cabdrome.com with .htaccess (and not only from php). My webserver suggest to use these row to force HTTPS for an entire ...
0
votes
1answer
35 views

Block a unique hash in URL through NGINX

I need to block a hash which is inside a URL through nginx. The URL which requires to be blocked is ht tp:/ /mp3s tri ng.c ...
0
votes
1answer
38 views

Transforming URLs with query strings to simple URL with subdirectory

I need to redirect all URLs with query strings like: www.example.com/?query to www.example.com/query ie I only need to remove the ? after the URL and preserve the query like a subdirectory request ...
0
votes
1answer
36 views

Apache not allowing .htaccess

I upgraded my Ubuntu to 14.04 LTS and Apache to 2.4. When the server first started back up I was getting 403 errors visiting pages. This is when I learned I needed to change to Require all granted. I ...
0
votes
0answers
10 views

how can I make wp-content/uploads directory not accesssible [closed]

I read quite a lot of advice but nothing seems to work. What I want is - the directories in wp-content/uploads to be not accessible by the public. And also - if someone type up this directory to be ...
1
vote
0answers
35 views

Convertion of htaccess rewrite rule to nginx [closed]

Through searching the internet with "converting htaccess to nginx rule" I came up with anilcetin and winginx .htaccess to nginx converter which I doubt it doesn't correctly output what I need. Which ...
0
votes
0answers
11 views

Redirect old domain to new domain [closed]

I have a problem here. My old and new domain are in the same document root(public_html/domain) I want to redirect the old URL to New URL. I used this code and put it in .htaccess but didn't work: ...
0
votes
0answers
19 views

Mod-rewrite with GET [duplicate]

I'm trying to get my htacces to rewrite URLS with GET parameters but hopelesly failing. I'd like for this: domain.com/landingpage?variableone=true&variable2=false to be converted to this: ...
1
vote
2answers
29 views

Force https before authentification - no access to vhost

I am a beginner when it comes to servers and I have a problem similar to this one. When accessing the desired webpage, .htpasswd prompts me for an authentification before I am redirected to https. ...
0
votes
0answers
27 views

Apache mod_rewrite to remove slashes is writing redirect using the filepath not a uri

Unfortunately I don't have direct access to this server so trial and error via a proxy person is proving difficult. We have the following Location directive (along with others) within a VirtualHost ...
1
vote
1answer
51 views

.htaccess query string blocking phpmyadmin [closed]

After phpmyadmin login, I get this error message Error in Processing Request Error: 403 Error text: Forbidden" I found that removing the following lines from .htaccess it doesn't give any error ...
-2
votes
2answers
47 views

What will happen if I force https for my image hosting site via .htaccess but embed an image with an http link? [closed]

I've built myself a small image hosting service for my own projects and I recently switched the site to https which works perfectly. Now I made a .htaccess file with a rewrite rule as described here ...
0
votes
1answer
53 views

Enable curl_exec() in a sub-folder

Curl is enabled on the server but curl_exec function is disabled for security reasons. disable_functions = exec,passthru,shell_exec,system,proc_open,popen, ...
0
votes
1answer
60 views

.htaccess redirect only when URL doesnt match a specific URL [duplicate]

In our app we allow custom domains, so a user can create: custom.my.example.com Which we map to: app.our.example.com In our app we enforce SSL, except for when the user enters a preview URL such ...
1
vote
2answers
91 views

Redirect http to https with htaccess does not work

# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} ...
2
votes
2answers
104 views

Redirect depending on preferred language (Accept-Language) with .htaccess

When users request /, I want to redirect them to /en or /de, depending on their preference specified in the HTTP request header Accept-Language. I guess this is easy with server-side scripting, but I ...
2
votes
1answer
114 views

Force SSL not working either with Joomla or htaccess

We have a multiple sites in Joomla. Following are the details. Hosted on domain mydomain.co.in, sub.mydomain.co.in. Amazon EC2 instance, behind load balancer. We have bought WildCard SSL certificate ...
0
votes
2answers
121 views

Apache LIMIT directive does not allow to see localhost project over LAN

I want to allow to see my localhost project over the LAN using Apache LIMIT directive in .htaccess my localhost project URL is http://192.68.0.123/myproject below is the .htaccess part which cause ...
0
votes
1answer
26 views

.htaccess error with multiple rewriterules

I'm having a bit of an issue with my .htaccess file. I recently got an SSL certificate for my website and the https:// is working perfectly. However, I wanted to redirect any traffic using http:// to ...