Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
1answer
47 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
129 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
227 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
22 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
26 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
35 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
72 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
46 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
195 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
36 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
179 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
415 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
114 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
100 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
40 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
43 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
79 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
22 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
25 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
32 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
22 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
16 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
35 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
22 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 ...
1
vote
0answers
12 views

How to provide read access to a folder and its files via htaccess

This is probably trivially easy but after RTFM'ing and trying several things I seem to be a bit stuck... The current version "appears" to let me access the directory BUT NOT the files via the ...
1
vote
1answer
140 views

Wildcard subdomain redirect to folder without changing the url

So I got my htaccess file set up, it look like this: Options +FollowSymLinks RewriteEngine on RewriteBase / # MAGIC RewriteCond $1 !/$ RewriteCond $1 !\. RewriteRule ^(.+)$ /$1/ [R=301,L] # ...
1
vote
1answer
82 views

Disable https for a single file in apache

For a long time, I didn't use https on my linux server because I didn't find a decent CA that suits my needs. Now, Let's Encrypt (a new CA that provides free certificates) has launched their open beta ...
1
vote
1answer
77 views

apache httpd mod_expires does not work when deflate is on

On a Debian Jessie installation, I manually installed wordpress and edited .htaccess, turning mod_expires on: ExpiresActive On ExpiresDefault modification However, when I use Firefox Inspector to ...
0
votes
0answers
20 views

Strange bug with htaccess

I have a website installed on "/aaa/bbb/ccc/index.php". I created a file "/aaa/bbb/ccc/.htaccess" with only this content below and nothing else: RewriteEngine on After that I created a file ...
2
votes
1answer
146 views

Laravel and Wordpress on same server/domain

I am trying to host a WordPress site inside a Laravel(5.1) project. I have the following structure (stripped down some) ├── app ├── config ├── public │   ├── index.php │   ├── wordpress -> ...
0
votes
1answer
102 views

How to prevent opening /index.php or /index.html urls?

DirectoryIndex index.html index.php # -- INIT RewriteEngine on RewriteBase / # -- PRODUCTION # RewriteCond %{HTTP_HOST} ^www.assist\.loc$ [NC] # RewriteRule ^(.*)$ http://assist.loc/$1 [R=301,L] # ...
0
votes
2answers
41 views

.htaccess rule to 301 redirect /?my_foo=bar to /foo/bar/

I tried, unsuccessfully, for hours to build (what I think is) a simple 301 redirect in an htaccess file. My url looks like this: www.example.com/?my_foo=bar And I want it to 301 redirect to: ...
0
votes
0answers
21 views

Why is my redirect not working?

I have noticed a problem on a website that I manage. It is currently setup to redirect https://www.domainA.com to https://www.domainB.com This appears to be working but a similar redirect from ...
0
votes
1answer
66 views

Apache's SetEnvIf to another variable in .htaccess

Is it possible using SetEnvIf to set a variable to the content of another variable? and if so, how? For example SetEnvIf defined_htaccess_var ^(.*)$ has_been_defined=%{defined_htaccess_var} So the ...
1
vote
1answer
49 views

.htaccess commands are case insensitive?

I see the same .htaccess code snippet written with two different ways as follows: <Files .htaccess> order allow,deny deny from all </Files> and <Files .htaccess> Order ...
0
votes
2answers
68 views

htaccess protection of directory does not work any longer?

unfortunately the protection of my wp-login.php does not work any longer: <Files wp-login.php> AuthName "Forbidden access" Require ip 1xx.xxx.xx.x/24 </Files> This is apache's ...
0
votes
1answer
58 views

Force http on single page with site wide https is in place

On my website, I have one page that loads content in iframe form other sources and hence cannot have an http connection. I have an SSL installed and have a site wide https forced on all urls. I am ...
0
votes
0answers
25 views

problematic htaccess remapping of old domain urls to custom pages on new domain

I am remapping a bunch of urls from old domains to custom pages on the new domain, and a handful of rewrites for old urls don't seem to be applying. These are the rules i have now for the domain ...
-1
votes
1answer
82 views

how should i exclude certain .php URLs from being loaded through SSL?

recently i activated flexible SSL on my wordpress website,but i wish to load certain .php URLs through simple http, ones like: thankyou.php and contact.php ,and a few others, what code should i add to ...
0
votes
1answer
30 views

.htaccess Set custom variables

Is there a way to set custom variables inside my .htaccess files so I could use them later in my .htaccess code ? For example, I have a redirection to 2 different servers. Can I store the servers ...
2
votes
1answer
69 views

SuppressDescription Removes All Columns but the Name

I'm using mod_autoindex for some time with success (fancy index). However since I see no use for my "Description" column, I thought I'd remove it. According to the documentation, ...
1
vote
1answer
33 views

manage ip access control through httpd php app with virtual_host configuration

Problem The system is allowing universal access to the php app 'owncloud'. That is, access is granted to servers across the network. As a test 'Require all denied' did not control access. What is ...
1
vote
1answer
50 views

Apache rewrite rule to iis

I am trying to move site on apache to iis 8.5 All is ok, but 1 rule failes my site to run properly RewriteCond %{REQUEST_URI} !\.(js|css|jpg|jpeg|gif|png)$ [or] RewriteCond %{REQUEST_URI} ...
0
votes
1answer
15 views

How do I prevent RewriteRules conflicting

I have three RewriteRules I am trying to implement but I cannot get all 3 to work together: RewriteRule ^products$ http://%{SERVER_NAME}/en_ca/products [L,R=301] RewriteRule ^products/(.*)$ ...
1
vote
2answers
63 views

.htaccess deny/allow rules denying folder, but not direct to files

We have a .htaccess file in a folder configured with deny,allow as follows: Order deny,allow Deny from all Allow from <whitelist IP> Allow from <whitelist IP> .... There are no other ...