Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

1
vote
0answers
14 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 ...
0
votes
0answers
17 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 ...
-1
votes
1answer
20 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
5 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
6 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 ...
1
vote
0answers
10 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
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 ...
0
votes
0answers
18 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
13 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
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
15 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
50 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
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
30 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. ...
-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: ...
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
1answer
26 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 ...
0
votes
1answer
54 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 ...
-1
votes
2answers
55 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: ...
0
votes
1answer
16 views

.htaccess, Redirect doesn't work, RedirectMatch does

I've run into a situation I've never encountered before. We just moved a site between hosts and on the new host RedirectPermanent and Redirect commands in the .htaccess file seem to be ignored, but ...
0
votes
0answers
10 views

Please help me change .htaccess [duplicate]

I use: + VPS Lunux + CentOS 6.5 + install PHP 5.3 + No database. I want rewrite: http://example.com/?page=/mylinks.html to: http://example.com/mylinks.html in the ".htaccess" Leave one element: ...
0
votes
1answer
18 views

Password protected folder not visible

I am trying to run an internal apache server. I am trying to make a homepage like http://internalserver/ This will have a number of files and folders. I am trying to password protect one of these ...
0
votes
0answers
8 views

Redirect to URI + Query String using .htaccess [duplicate]

I am trying to setup my WordPress to redirect URL to URL+QueryStrying. I want to redirect http://example.com/path/uri/ to http://example.com/path/uri/?query_string=true I have tried different ...
1
vote
0answers
17 views

Why does one of these htaccess directives remove the query string and the other does not?

I am struggling to figure out why one of these htaccess directives removes the query string and the other does not. RewriteCond %{QUERY_STRING} p=invitations RewriteRule ^index.php$ /Invitations? ...
0
votes
1answer
29 views

CNAME, htaccess and ERR_NAME_NOT_RESOLVED

I have the following code to make sure that api.example.com will call example.com/api.php. It works on my localhost, but not on my website. RewriteEngine On # Handle Front Controller... RewriteCond ...
0
votes
0answers
9 views

Showing only main domain name in URL [duplicate]

Is it possible to make this with .htaccess. What I mean is for example when user go to page1, page2 ... page_n: http://example.com/page1.php http://example.com/page2.php http://example.com/page3.php ...
0
votes
0answers
5 views

Rewrite subdomain path to absolute path using htaccess [duplicate]

I need some help with htaccess to redirect a subdomain path to a totally different subdomain path. Example: http://support.domain.com/need/help --> http://blog.domain.com/8212/need-help I was ...
-1
votes
1answer
27 views

How to Get Rid Off 'index.php' in URI Using Virtual Host and .htaccess File?

I am using a Virtual Host for my Laravel 4 Project on my local host to get rid off typing 'localhost/L4/public/index.php/route'. Laravel also uses a .htaccess file in it's public directory. Both the ...
-1
votes
1answer
115 views

Alias not working in VirtualHost for a domain but works locally on localhost?

I have created a virtual host locally using domain name virtual hosting in which I have used an Alias to a directory pointing to another project on the same server (my local host) as given below: ...
0
votes
0answers
19 views

mod_rewrite index.php behind varnish server

I have on my pfSense router a Varnish server currently with 4 backends. 3 of the backends go to the same server on my network and the 4th goes to my development server I'm using to get some webapps ...
0
votes
1answer
60 views

HTTPS redirect, exclude subdomain - Opencart [duplicate]

I just switched to HTTPS on my server. Could you please help me with .htaccess to redirect all traffic to https://, exclude subdomains: www.example.com -> https://example.com example.com -> ...
1
vote
2answers
77 views

Permission denied: Could not open password file.

I am using Apache Red hat . I have .htaccess in my /var/www/html with permissions as followed -rwxr-xr-x. 1 apache apache 127 Dec 18 14:17 .htaccess .htaccess has following data set inside it ...
0
votes
0answers
40 views

Cross Origin Resource Sharing (CORS) Issue

I apologize in advance for no links - I am new to serverfault (Not StackOverflow), and don't have enough rep to post more than 2 links. We host our main Magento site on Nexcess at ...
0
votes
1answer
32 views

How to Handle Routes of Two Laravel Projects on One Domain or Server?

I'm working on a project divided into two separate parts. Part one, the bigger part, is in Laravel 4.2. Part two, the shorter part, is in Laravel 5. Both are on the same server. My goal is to access ...
0
votes
1answer
33 views

htaccess - insert php script name into all URLs

I have an application which requires an htaccess file in the directory /tileserver/ that contains the following: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 ...
0
votes
2answers
24 views

Apache URL masking

I need to access http://www.domain.com/uri-path-to-resource.rsc in the browser, but to display the content from http://shop.domain.com/uri-path-to-resource.rsc. Unfortunately ProxyPass could not be ...
1
vote
1answer
32 views

HTTPS redirect in htaccess only when a query parameter is not equal to something

Background I've managed to get http to https redirection working for my Wordpress installation by including this snippet in my .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On ...
0
votes
1answer
19 views

Apache Authenication -http request failing in sub directories

I'm running an apachev2.2 server and I am using LDAP to authenticate the root directory. The authenication works well, however my page uses php which is using the file_puts_content function to grab ...
2
votes
1answer
20 views

Something like foreach in htaccesss?

I am in this situation: url: domain/var1/var2/var3/.../varn And I want to change that url in: url: domain?v1=var1&v2=var2&v3=var3/.../&vn=varn I found this way: RewriteRule ...
0
votes
1answer
17 views

Apache Domain Redirect & Rewrite Query String

My Apache server will be receiving incoming requests from users in this format: http://192.168.1.182/SEARCH=searchstring&URL=http://test.com/blahblahblah I want to redirect users to another ...
0
votes
1answer
19 views

Dreamhost VPS Apache 2.2

This is a very unusual problem to begin with. Most people are having trouble with the .htaccess where they accidentally are denying permissions and want to fix that. I have the opposite problem. I ...
0
votes
0answers
12 views

.htaccess syntax RewriteEngine on

I'm learning to maintain my own WP site. After a lot of reading I ended up with my "complete" htaccess file that looks something like this DirectoryIndex index.php # Disable directory listings ...
0
votes
1answer
17 views

Is it possible to conditionally set php_value in .htaccess

I want to set php_value (error_log) based on the host server. If it is a local server: php_value error_log ./PHP_errors.log and if it is the remote server: php_value error_log ...
0
votes
0answers
20 views

Excluding a file from an IP block

I have recently converted a pre-2.4 configuration to Apache's new authorisation configuration but ran into a problem/misunderstanding concerning more than one RequireAll block. What I am basically ...
0
votes
0answers
22 views

RequireAll blocks overriding each other [duplicate]

I have recently converted a pre-2.4 configuration to Apache's new authorisation configuration but ran into a problem/misunderstanding concerning more than one RequireAll block. What I am basically ...