Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
1answer
12 views

Force HTTP on all pages except specific URLs

I have a situation where I need to force every single page in my site to redirect to HTTP except for two specific URLs which need to force redirect to HTTPS. The two pages that need to redirect to ...
0
votes
0answers
16 views

htaccess permissions randomly being used in parent directory

I have an Ubuntu 14.04 server, which I have had set up for a fews years with little adjustments. On the server I have a directory Movies which has a .htaccess file in it that requires authentication ...
0
votes
1answer
22 views

.htaccess config not working properly

Here is my current situation: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d [NC] RewriteCond %{REQUEST_FILENAME} !-f [NC] #the rule RewriteRule ...
2
votes
1answer
3k views

How to exclude a sub-folder from HTaccess RewriteRule

I have WordPress installed in my root directory, for which a RewriteRule is in place. I need to password-protect a subfolder ("blue"), so I set the htaccess in that folder as such. Problem is that ...
-1
votes
1answer
9 views

Apache Alias directive - not ignore .htaccess files

When using the Alias directive to map a URL to a directory outside the document root, it seems that the .htaccess files in the document root are not applied to those requests. For example, if setting ...
-1
votes
0answers
10 views

SEO URL's, don't know how to properly configure .htaccess

I have been trying for hours to figure out how to use .htaccess properly to make my posts such as http://domain/post.php?id=38 appear to the user as http://domain/post/the-unreal-truth In my ...
0
votes
1answer
46 views

Subdomain With Custom URL/Domain

I have a subdomain called 'mysite' at this.example.org/mysite which needs to resolve to mysite.org in the address bar. Can this be accomplished with .htaccess in the mysite public_html folder, or ...
0
votes
0answers
6 views

Implement apache equivalent mod_rewrite functionality in lighttpd

Here's the mod_rewrite .htaccess file which is meant to work on Apache Servers for my web-app RewriteEngine On RewriteBase /cs200/tokens/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
0
votes
3answers
2k views

Setting Access-Control-Allow-Origin in .htaccess for Https protocol

I have a site with http and https. I set in the .htaccess the following line which runs for http. Header set Access-Control-Allow-Origin "*" But with https I get this error. No ...
0
votes
2answers
1k views

Server, Database or Code Issue? Magento backend rewrites itself with a index.php which doesnt work

I will be honest and admit my cross posting in magento.stackexchange.com but the reason is that I believe it is a server fault, and now I am looking for proof to present to my dreaded hosting ...
3
votes
3answers
2k views

How can I upload/download or modify .htaccess files using WebDAV?

I've set up a Ubuntu server with Apache 2. Instead of FTP, I'm using WebDAV to upload/download files and it works great. However, it's not possible to upload/download or modify .htaccess files, ...
0
votes
0answers
11 views

Is it possible to assign domains automatically just by pointing them to NS1 & NS2? If so, how? [on hold]

I have a Bluehost dedicated server. Assigning domains from cPanel can be a pain in the neck. Is there a way to assign domains automatically. For example, once I point "example.com" to ...
0
votes
2answers
65 views

Apache2: serve page from another IP address

Please bear with me while I try to explain some htaccess gymnastics I'd like to perform. I have this domain: eamorr.somesite.com, at 192.168.100.100. It is serving pages from my public_html folder ...
1
vote
0answers
15 views

https://www.domain.com wont redirect to https://domain.com on vps

hello so i have this on my apache configure file: <VirtualHost *:80> other stuff here Redirect permanent / https://domain.com/ </VirtualHost> this works great it redirects all ...
1
vote
0answers
26 views

migrating htaccess from Apache to nginx

I'm trying to start using Homestead for my non-Laravel projects (legacy) and I managed to install box 0.3.3 successfully by cloning laravel/homestead 2.2.1 (with PHP 5.6.15). Now my problem is due to ...
1
vote
0answers
16 views

HTTP to HTTPS redirect not working!? - Tried multiple methods

I purchased a Standard UCC SSL Up to 100 pack from Godaddy. I have installed all the required files on my server, and going to https://www.example.com works fine, but http://www.example.com is NOT ...
-1
votes
1answer
26 views

Enable an external website to resolve to a page on my parent website, keeping URL the same

I have a domain, www.example.COM. I have a page on that domain, www.example.com/page. I have another domain, www.example.NET and I want that domain to resolve to the page first mentioned, ...
0
votes
0answers
32 views

mod_headers not working in .htaccess

I'm trying to migrate the websites of a client to a new server. The old one was running mod_php 5.2 and apache 2.2, and the new one is running apache 2.4 and php 5.2 in cgi mode (the idea being to ...
0
votes
1answer
1k views

Apache .htaccess with mod_expires not working for certain directories

I have a Joomla site that I am trying to enable caching using mod_expires. I have the .htaccess in the root of the site and have added the options as found on the page ...
0
votes
2answers
278 views

Unexpected behavior with htaccess Redirect 301

I have the following in my .htaccess file- Redirect 301 / http://www.foo.com/south-carolina-real-estate/ Redirect 301 ...
0
votes
0answers
7 views

Rewrite and redirect from two parameter dynamic URL to a static URL with .htaccess, Second Parameter should be comma seperated

I am trying to rewrite and redirect from http://example.com/page.php?fid=123&name=title%20of%20the%20blog to http://example.com/name/title-of-the-blog.jsp. So that if either of the above URLs is ...
0
votes
0answers
7 views

301 redirect entire domain to a single page .HTACCESS

First try: Chated for over 3 hours with an representative of one.com. Best advice they could gave me: do a metarefresh. Bummer. Second try: Options +FollowSymLinks RewriteEngine on ...
4
votes
1answer
4k views

Error headers: ap_headers_output_filter() after putting cache header in htaccess file

Receiving error: [debug] mod_headers.c(663): headers: ap_headers_output_filter() after I included this within the htaccess file: # 6 DAYS <FilesMatch ...
0
votes
2answers
155 views

htaccess rule to rewrite %3F to ? and %3D to =

I need to rewrite the URL of my site which contains %3F to ? and %3D to = I have tried this rule: RewriteCond %{HTTP_HOST} myhostname RewriteRule ^(.*)%3F(.+)%3D(.+)$ $1?$2=$3 [L,R=301] ...
1
vote
1answer
343 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
0answers
13 views

An equivalent to ProxyPreserveHost in .htaccess? [migrated]

I am moving a website from one shared host to another. The site is all files. I have already copied the files to the new host. I'd like to redirect all HTTP requests from the old host to the new ...
3
votes
1answer
147 views

redirect 301 subdomain to same subdomain but in new folder

I want to redirect 301 subdomain to same subdomain but in a new folder. So I want to redirect http://sub.example.com/(.*) to http://sub.example.com/folder/ But when I go to folder the page does not ...
0
votes
0answers
19 views

A specific issue with Apache 2.2 URL rewriting

How can I use mod_rewrite to change the URL from http://mindnmotion.com/mindnmotion/2015/12/26/poverty-and-homelessness/ to http://mindnmotion.com/2015/12/26/poverty-and-homelessness/ I do not have ...
0
votes
1answer
7 views

301 redirect appends url

I'm trying to redirect all visits to a site's splash page (/index.html) to a page deep in the hierarchy (/a/b/c/d.html). My redirect rule manages an empty path, but does an infinite loop if I go ...
0
votes
2answers
22 views

.htaccess rule gives 500 error for php file

I used a stackoverflow answer to come up with what I was trying to do. I want requests to http://myserver.com/book/1234 to actually show the content form php file http://myserver.com/book.php?id=1234 ...
0
votes
1answer
15 views

Break up a long line in a .htaccess file

I am setting a Content-Security-Policy header in my .htaccess file, and it has grown to be an extremely long single line, which is a bother to manage. Is there some way to break up this line into more ...
0
votes
0answers
14 views

RewriteCond fails on existing file

So, my .htaccess file starts with: Options -MultiViews RewriteEngine on RewriteBase / And I tried: RewriteCond %{REQUEST_FILENAME} -f or RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f or ...
-1
votes
0answers
9 views

.htaccess strip everything after ?tag [duplicate]

I need to remove everything after and including "?tag". The problem I've is that the product, for example "1-4-inch-cmos-720p-wi-fi-video-door-phone" always is different. Is URL: ...
0
votes
1answer
2k views

.htaccess Rewriting Tomcat Server

I am writing a website using Railo. My code is to be deployed on a Railo Server running on Tomcat, overlayed on a regular Apache+PHP server. I need to send all requests to ...
0
votes
0answers
9 views

Two set of RewriteRules in .htaccess - Does RewriteRule clear all the RewriteCond's?

I have a .htaccess for a WordPress site that currently looks like this: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond ...
0
votes
0answers
17 views

apache's 'Satisfy any' gives access to .htaccess

On a default install of apache on ubuntu (14.04), adding a Satisfy any to a directory gives immediate access to .htaccess files therein. I thought I understood how apache's access control worked, but ...
0
votes
2answers
38 views

Regarding rewrite engine

My htaccess file contains this Options +FollowSymLinks RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^.*$ ./index.php this redirects all ...
0
votes
0answers
53 views

Fix ERR_TOO_MANY_REDIRECTS after adding trailing slash in URL

I have a Magento website hosted in a managed server where we need to use two .htaccess files, the first one is needed to redirect all request to a subfolder /current/src/ and is placed directly in ...
0
votes
1answer
35 views

How to map apache to use an index file inside another directory in www/html/ without reflecting on url

Apache version: 2.4 OS: Ubuntu 14.04 I am not sure whether I wrote the heading correctly. My index file is located at some directory (say /var/www/html/new/ ) rather than the default apache root. ...
0
votes
1answer
58 views

Nginx - redirecting all requests after a URL path to a PHP script

In our existing Apache setup, we have a .htaccess file in a folder which redirects all requests to a PHP handler. For example: www.example.com/gallery/user01/xyz.png For this URL request: The ...
0
votes
4answers
1k views

How to block Ip in .httaccess on Apache 2.4

I've upgraded Apache 2.4 and would like to block an Ip this could be done by using the following in the .httaccess on Apache 2.2 Order Deny,Allow Deny from 50.62.136.183 However how can I achieve ...
1
vote
1answer
13 views

need the name of http_host for a htaccess rewrite condition

I want to write a rule where I don't know the exact http_host. For example I have (www.)?example.com. Now I need example to build the following: (www.)?example.com/example/... in a RewriteRule. So ...
0
votes
0answers
11 views

Apache rewrite rules in both config and .htaccess

I have a CakePHP application hosted in a virtual host (Apache 2.4) which works OK. Now in the internal network where the virtual host name cannot be routed so I have to use the web server IP. And ...
0
votes
1answer
28 views

Apache htaccess redirecting subdomain traffic to primary domain when https

I'm having issues reaching one of my subdomains via https. Consider the following domains: mydomain.com tasks.mydomain.com stuff.mydomain.com Whenever I attempt to go to ...
-1
votes
1answer
14 views

Catch all Subdomains in one PHP-File

I have a Domain, lets say "example.com" and a Server running CentOS and Apache On my Server I have a Webpage that works just fine but I want to catch all Subdomains in one PHP-File: ...
-2
votes
3answers
4k views

How to restrict wampserver access to certain ip addresses? [closed]

What do I need to do in order to restrict the access to my wamp server to certain ip addresses. Just imagine that the my ip address is the ip address that I only want to have access I tried to edit ...
2
votes
1answer
1k views

Apache deflate ignores javascript

I have set up deflate in my htaccess. Everything works fine, except for some reason javascript files are being ignored. I tried every possible combination of AddOutputFilterByType DEFLATE with ...
0
votes
1answer
1k views

.htaccess not being loaded in Ubuntu 14.04 (Apache 2.4.7)

I'm trying to use the .htaccess file in Ubuntu 14.04 (Apache 2.4.7). Here is what my .htaccess looks like # 1 YEAR <FilesMatch "\.(ico|svg|woff|eot|ttf)$"> Header set Cache-Control ...
3
votes
1answer
166 views

Htacess rewrite for AngularJs App

I need help regarding AngularJs application. I need htacess file for HTML5Mode in AngularJS and Hashbang fallback. Can someone help me? Cuz i get %2F when i use backslash. I've been folowing along ...
-1
votes
2answers
65 views

.htaccess Permission Denied (Apache, CentOS 7)

I'm encountering an issue with .htaccess. I have searched through the Internet and all the solutions didn't work. Please help me! Thx! In the Apache error log, it has the following line: ...