Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

2
votes
0answers
326 views

(WordPress) .htaccess redirecting actual subfolder location

I have WordPress setup in root, but I have a sub-folder that is not related to WordPress as well. I just moved servers, so before if I went to .com/admin/ I would get that subfolder. Now, I (and ...
2
votes
0answers
61 views

Opencart .htaccess

I am pretty new to OC and am running the latest version. I am ready to open up my site to the (potentially) many hundreds of people whom I hope will have a look, like something and then buy it! My ...
2
votes
0answers
597 views

setting up mod_proxy - plesk, apache, .htaccess?

I want to set up mod_proxy to work so that my blog is running under a subdirectory of my site rather than subdomain so i get the seo backlink benefit. What im looking to do is get my tumblr blog ...
2
votes
0answers
2k views

Apache + Codeigniter + New Server + Unexpected Errors

Alright here is the situation: I use to have my codeigniter site at bluehost were I did not have root access, I have since moved that site to rackspace. I have not changed any of the PHP code yet ...
2
votes
0answers
39 views

AWS ElasticBeanstalk for PHP is stripping the first slash off some requests

I've noticed that the leading slash gets stripped from requests and subsequently alters REQUEST_URI based routing lookups in my application. Is there either a way to disable this or documentation on ...
2
votes
0answers
370 views

Cherokee port rewrite urls from .htaccess

I am tryging to port my htaccess rewrite rules to Cherokee. I already tried this. This works for me, but I can't seem to get the rule I am using working. The apache rule: RewriteRule ...
1
vote
0answers
21 views

Converting .Htaccess Rewrite Rule to Nginx

I have the following apache rewrite rule which I am trying to convert to work with nginx. RewriteRule ^(.*)\/(.*)-(\d{4})(?:-(.*))?$ album.php?artist=$1&album=$2&releaseyear=$3&extra=$4 ...
1
vote
0answers
35 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. ...
1
vote
0answers
59 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. ...
1
vote
0answers
167 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 ...
1
vote
0answers
90 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 ...
1
vote
0answers
325 views

blocking referring domain and all of its subdomains via rewrites in htaccess

I'm looking to block two referrers along with all of their subdomains. When using this in my htaccess, they're not getting a 403, but instead a 500 response from apache (complaining about too many ...
1
vote
0answers
377 views

Apache2 - 500 server error when trying to access .php file

I have a webserver (Apache2, configured on Ubuntu Saucy Salamander 13.0x). On this server I have the following file in question: /var/www/xxxxx.com/insertToDB.php Accessing this file using GET ...
1
vote
0answers
54 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 ...
1
vote
0answers
431 views

How to rewrite using htaccess if the file exists in another folder?

We are trying to rewrite to another folder if the file does not exist in the document root, but does exist in the other folder. The other folder is in a completely different location, which is ...
1
vote
0answers
221 views

htaccess, errordocument and joomla rewrite

I need to setup a 404 error handling in my .htaccess, besides handling some 301 redirects for the links of an old website. The new site is made with Joomla, the old site was written in asp. Sef urls ...
1
vote
0answers
201 views

AuthType Digest Realm Password White Space Issue

I have an issue where I am trying to set a test directory to authenticate using the AuthType Digest. I have been able to successfully complete this but only when the AuthName of .htaccess is one ...
1
vote
0answers
32 views

htaccess is not redirecting in server

I'm having problem with a .htaccess file removing request.php from URL. My htaccess file is <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
1
vote
0answers
150 views

RewriteCond if folder with parametername exists

I want to make a subdomain-redirect if a folder with the same name as the typed subdomain exists. e.g. I have some folder-structure like www.mysite.de/mainpage/hui.php and want to be able to access it ...
1
vote
0answers
230 views

Is it possible to reference environment variables from a php_value statement in .htaccess?

I am trying to access an environment variable in a php_value statement within an .htaccess file. Here's a couple example usages: php_value include_path ...
1
vote
0answers
198 views

mod_rewrite after a cname

I have the domain foo.bar.example.com. foo is one of many sub-subdomains under bar.example.com. I need to capture and redirect all links at foo.bar.example.com that begin with "/special/". ...
1
vote
0answers
100 views

Conflict with 3 different RewriteRules in .htaccess?

I'm using the below in my .htaccess file. There 3 types of redirects: redirect to directory /admin/index.php redirect to specific .php files e.g. /about redirect to user profile page from /John ...
1
vote
0answers
249 views

Apache2 - 404 Error - migrate php files from Windows to Ubuntu met errors

I can't find out anything go wrong. appendix with 00-default AccessFileName .htaccess Alias /api "/var/www/AppServices/public" Alias /server_api "/var/www/AppServices/Server_API" Alias /client_api ...
1
vote
0answers
112 views

htaccess, mod_rewrite, remove part from URL

I want to access domain.com/api/(.*) instead of domain.com/public/api/(.*) Directory structure: domain.com __folder1 __folder2 __public ____api ______.htaccess2 ____afolder1 ____afolder2 ...
1
vote
0answers
612 views

Can't load my php.ini on localhost

I have a server and a local version of it on my hard drive. I am trying to access the local version through localhost. Entering localhost works, I enter the base html file and all that. The problem ...
1
vote
0answers
50 views

Static site to dynamic - rewrite loop

I have wordpress installed in a subdirectory of the root. I have followed the instructions provided to put index.php in root and create appropriate htaccess file. Site is up and running. Can access as ...
1
vote
0answers
966 views

PHP.ini custom settings through htaccess

I'm confused by this ini list in the PHP Manual: http://www.php.net/manual/en/ini.list.php I want to set some custom php.ini values through htaccess, but which one of these commands is not going to ...
1
vote
0answers
130 views

Why forbidding all php files from a directory with mod_rewrite denies access to the directory listing?

Server: Apache 2.2.17 I have the next .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule !^includes/ - [S=1] RewriteRule ^includes/[^/]+\.php$ - [F,L] RewriteRule ...
1
vote
0answers
692 views

htaccess and Dropbox

I'm looking for some help integrating a Dropbox landing page to my current htaccess. I've found this great script (not supported by my hosting because use mod_proxy [P] in Apache) ...
1
vote
0answers
161 views

.htaccess to pass FULL URL into other PHP link as $_GET

From .htacces file, how to pass/redirect the FULL URL to another URL as GET Variable? Like: http://www.test.com/foo/bar.asp will be redirected to: ...
1
vote
0answers
532 views

mod_rewrite in alias directory not working

I have a wp blog which lives under /var/www/mysite.com/blog and is accessible via www.mysite.com/blog When visiting www.mysite.com/blog/ I see the index page, but all links on subdirectories are no ...
1
vote
0answers
905 views

Mod_rewrite with UTF-8 accent, multiviews , .htaccess

Problem: with Mod_rewrite, multiview & Apache config Introduction: The website is in french and i had problem with unicode encoding and mod_rewrite within php wihtout multiviews Old server was ...
1
vote
0answers
462 views

How to prevent htaccess from prompting authentication for indirect access to a file via ajax?

First off my terminology is probably wrong but when I hear "direct access" I think someone means that anyone has read privileges to a file from the url. Is my understanding of what "direct access" ...
1
vote
0answers
77 views

htaccess not loading in sub directories

I know PHP4 is no longer in use, but a pretty large custom script, that requires it, works perfectly fine. So there is no point in fixing something that's not broken. I have a PHP 5 script that I ...
1
vote
0answers
311 views

RewriteRule not working in .htaccess but without error

I have a rewrite rule that it's not working but it doesn't throw any error so I can't figure it out. The .htaccess file is as follows: RewriteEngine On RewriteBase /site/ RewriteRule ...
1
vote
0answers
459 views

How do I get self signed SSL certificates to work locally on Mac OSX?

I'm trying to test a local page on my local git repository. Unfortunately, the SSL certificates I installed using OpenSSL and Mod_SSL aren't seeming to work. I've worked on checking the httpd file ...
1
vote
0answers
62 views

Serve a specific set of error pages for different subdirectories

I am currently trying to setup 2 different sets of Error documents for separate folders within a website. I have 2 folders within the root of a site: demo/ live/ Any requests that return 404's or ...
1
vote
0answers
36 views

Odd Behaviour with wildcard sub domain

I am trying to get wild card sub domains working on my project here and it does seem to be working but i have come across some very odd behaviour here, every time i try to visit any subdomain instead ...
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
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
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
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 ...
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 ...
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
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; ...
0
votes
0answers
75 views

Apache Header Module Loaded but can't set headers in htaccess

I have Apache 2.2.29 (unix) setup and running on my new dev machine (mac). I am trying to set CORS headers for an API project - something that I have done many times. The htaccess file for the ...
0
votes
0answers
12 views

Apache2 as ReverseProxy Using htaccess; Limit acces to subdirectory with different user than to root folder

I have a WebApplication behind a Apache2.2, which is used as a reverse proxy. Now I want to limit access to the root folder of the application and to the subfolder docs. However I need different users ...
0
votes
0answers
26 views

Subdomain only read the index file

This is the structure of the directory: +example.com +public_html +assets //assets directory of example (css,js,img) -index.html //the index file for example +subdomain ...
0
votes
0answers
42 views

Password protect folder and allow all subfolders (apache)

I'm trying to password protect one folder on my web site using an .htaccess file with an .htpasswd file. It works and I get it to password protect it. Can I add something to my folders .htaccess file ...