Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
15 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
10 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
0answers
16 views

INNODB failure in MYSQL

I had faced an issue in INNODB Engine, but it get solved, when added buffer memory in /etc/my.cnf file, but there happened an unusual thing that the .HTACCESS file of some domains get modified as the ...
1
vote
0answers
13 views

url injection - server hacked [duplicate]

I have a vps with virtualmin installed to host 6 wordpress websites. Recently I had a notification from Webmaster Tools saying that one of my websites was hacked - URL injection. I saw in Analytics ...
-2
votes
2answers
49 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
13 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
20 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
9 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
41 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
55 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
27 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
26 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 ...
-2
votes
0answers
16 views

CodeIgniter php framework: js and css files inside “application” folder. How to do? [migrated]

I just installed the php framework CodeIgniter 3 and it seems that JS,CSS and images should be placed OUTSIDE Application folder. If not, link to those files inside views does not run. For many ...
0
votes
1answer
26 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
8 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
21 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
5 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: ...
1
vote
0answers
16 views

How to redirect all uppercase .JPG extension to lowercase .jpg using htaccess? [duplicate]

I need it to be so that any time anyone visits url like: mydomain.com/SomeThiNg/file.JPG they instead visit: mydomain.com/SomeThiNg/file.jpg Like above, ONLY CHANGE THE CASE OF THE JPG ...
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
1answer
24 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
19 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
39 views

.htaccess query string blocking phpmyadmin

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
40 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
39 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
51 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
54 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} ...
1
vote
2answers
50 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
44 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 ...
-1
votes
0answers
54 views

Prevent iframe URL redirection in .htaccess

I am surviving from .htaccess 301 redirection issue. I need to redirect my my.domain.com/direcoryname urls to my.domain.com. It is working by Redirect 301 /directoryname my.domain.com/directoryname. ...
0
votes
2answers
63 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
24 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 ...
-1
votes
1answer
36 views

Do incoming https posts require https URL's

We would like to have HTTP posts from secure servers be secure on our end. Do the posts need to be made to https://ourserver.com, or does it work to post to http://ourserver.com, and then redirect to ...
1
vote
1answer
35 views

Limiting the access to /wp-admin/ for the whole server

I want to limit the access to /wp-admin/ to specific IPs or even localhost it's described here http://codex.wordpress.org/Brute_Force_Attacks#Limit_Access_to_wp-admin_by_IP but that seems to be for ...
0
votes
1answer
16 views

Easy way to make domain.com/wp-admin/ for all sites on a server accessible only for localhost?

I have problems with attacks to those so thought best would be to limit the access for them only to locahost. But what will be the best (and easy) way to do that?
0
votes
1answer
72 views

Apache 404 returning 500 errors. Request exceeded redirects

I'm trying to setup a site with static HTML with Apache 2.2.22, but I'm getting a 500 error instead of 404. The message in the error log is: [Sun Dec 14 09:48:45 2014] [error] Request exceeded ...
2
votes
2answers
45 views

Apache to Nginx Conversion (Newbie)

I've got a Nginx Web Server Setup with PHP and I want to move on Nginx and I want to convert these .htaccess rules to nginx.conf file: RewriteRule ^blog(|/)$ /data/core/site/blog.php RewriteRule ...
0
votes
0answers
27 views

301 redirect with mod-alias and mod-rewrite

my htaccess file has these lines: RewriteRule ^newlink ?do=something Redirect 301 /oldlink/ /newlink when i write http://www.example.com/oldlink/, browser redirects to ...
0
votes
1answer
22 views

Wordpress Opening From Wrong Directory

I have an Amazon ec2 m3 medium instance running AMI(RedHat based) Linux. I am trying to host multiple domains on this instance by adding this at the end of httpd.conf: <VirtualHost *:80> ...
0
votes
1answer
41 views

mod_expires does not affect caching

I have mod_expires installed in Apache on CentOS VPS. It is also listed in the loaded modules, I checked by this command /usr/local/apache/bin/httpd -l When I place the code in .htaccess, and then ...
-1
votes
1answer
76 views

Excluding a directory from a root .htaccess rewrite rule to disallow from caching

On my lamp installation, I have in the root folder "/" (mydomain.org) a wordpress multisite with W3 total cache activated, I have also a sub_dir called "sub" (mydomain.org/sub) with a PHP script ...
2
votes
1answer
67 views

Can Apache .htaccess convert the percent-encoding in encoded URIs from Win-1252 to UTF-8?

I want to add a directive in my .htaccess, such that if the browser is pointed at a URI containing %E4 (ä) - or any other special character - the .htaccess automatically rewrites %E4 (ä) as %C3%A4 ...
2
votes
1answer
129 views

Blocking all users without referrer BUT allowing Googlebot/bingbot at the same time (with .htaccess)

Because of some amateur-made DDOS attack on my website, I had to deny some traffic with .htaccess which worked fine. Unfortunately, it also blocks the googlebot/bingbot: order allow, deny deny from ...
0
votes
1answer
17 views

.htaccess entry to return simple text based on the URI

I have URL http://foo.com/bar?abc=123, what would be the correct entry in the htaccess file to return a simple text 200 status of abc=123? Basically, I just want to return the entire query string as ...
0
votes
1answer
27 views

apache tries to access .htaccess in lost+found directory

A subdirectory /var/www/vhost/servername/httpdocs/subdir/of an apache (ver. 2.2.22 on ubuntu 12.04) vhost webroot is a disk partition of its own. Accordingly, there is also ...
0
votes
1answer
186 views

Either all Options must start with + or -, or no Option may [closed]

I have this line in a .htaccess file Options +SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes ...
0
votes
1answer
46 views

Ubuntu + Apache + .htaccess: Hide from Google

How do I edit the .htaccess file in the folder www/owncloud/ to set: X-Robots-Tag to "noindex, nofollow" (Using header rather than robots.txt according to: https://yoast.com/x-robots-tag-play/) Have ...
1
vote
2answers
79 views

Can I make Apache ErrorDocument return 404 instead of 301?

In my .htaccess I have ErrorDocument 404 http://foo.com/404.html It works, in the sense that I recover from any file not found error and show the 404 page instead, but the way it works is to ...
0
votes
0answers
28 views

http to https using htacess file [duplicate]

I went the entire website to be accesed only with https. In .htacess to i written the following rule RewriteEngine On RewriteCond %{HTTP_HOST} ^www.my-website.com [NC] RewriteCond %{SERVER_PORT} ...
0
votes
1answer
108 views

Force SSL for every URL except one path using .htaccess

I'm trying to enforce SSL for every URL except one with the first segment /preview. http://test.example.com/preview/blah/blah should be ignored by the rule; every other URL should be forced to use ...
-1
votes
2answers
96 views

How to use .htaccess and .htpasswd for selective redirects & passwords

In my /var/www/ directory I have many directories some like: /var/www/impdata/ /var/www/data/ So can I achieve this: When I go to: www.websitename.com/data/ it should give an 404 error. And when ...