Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
0answers
6 views

htaccess - Keep Domain but change subdomain

I've been trying around for ages now. I need to be able to redirect a call to a page to a specific subdomain of the same domain. Meaning, people are calling www.noodle.de, noodle.de or ...
0
votes
1answer
42 views

Wordpress .htaccess How to avoid redirect loops for images?

I'm configuring Redirects from a Html static website to Wordpress, I'm doing it manually in the .htaccess file and for some other rules I'm using Redirection plugin I have added these rules to my ...
0
votes
0answers
10 views

.htaccess Conditional based on MIME Type?

I know I can add a conditional based on the extension of the file being requested like so: <FilesMatch "\.(html|htm|php)$"> # blah blah blah </FilesMatch> But is there some way I ...
0
votes
0answers
24 views

Rewrite Query String to Display as Subdomain in Browser?

I have search every possible resource however, I have not been able to find the help i need so i thought i would ask here. I am not highly educated in .htaccess rewrites so please bare with me if i ...
0
votes
2answers
36 views

Testing htaccess for 500 server error without actual error

After reading some tutorials, I have created an error file, that should be displayed instead of 500 server error. I have added it to domain's root and added the following line to the bottom of ...
0
votes
1answer
46 views

Using htaccess to grant access to index file when user requests directory URL

I would like to use htaccess to allow access to the index file plus a few others in a directory (index.php) but require a user/pass for everything else in the directory. Right now I have: AuthName ...
0
votes
0answers
39 views

Htaccess redirect to https and www using a single RewriteRule

I have the following in my .htaccess file: RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. RewriteRule .* ...
0
votes
0answers
25 views

Remove ?=collcc from url

Today i found at google webmasters tools too many duplicated url, some parameters added i don't know why but i need to remove it, for example http://my-site.com/5454/my-utr.html ...
-2
votes
1answer
14 views

Only apply .htaccess rules based on url [duplicate]

I am looking to only apply certain rules if domain is *.example.com. How can I do this? ##start if domain is *.example.com## RewriteEngine On RewriteCond %{HTTPS} !=on RewriteCond ...
-1
votes
1answer
35 views

Apache to nginx migration: friendly urls. Rewrite and post data

I am migrating a little API from apache to nginx and I have changed the htaccess file to location rules in nginx config file. I have a POST request that is loosing the post data. This is the ...
-1
votes
1answer
29 views

Cannot get application to use htaccess unless pointing to index.php

I am having difficulty getting one of my applications to use the htaccess file inside its path unless i point directly to index.php in the browser I have installed on my computer ubuntu: Distributor ...
0
votes
1answer
29 views

how to block access for RSS Feed using htaccess

My website is experiencing RSS Feed problem I get this htaccess code Order deny,allow Deny from all Allow from xx.xx.xx.xx but it blocks all IP address i just need to block mywebsite.com/feed.php ...
0
votes
0answers
33 views

Force nginx to answer HTTP 1.0

In Apache we can create .htaccess: SetEnv downgrade-1.0 Is there alternative in nginx?
0
votes
0answers
52 views

Rewrite subfolder as root on apache and passthrough to subfolder

I have a multi-language site with sub-folders for each language (en, pt, es, etc) I need to set things up in htaccess so that I can easily change the default language if the need arises. So I ...
1
vote
1answer
30 views

mod_rewrite issue Apache behind Nginx

I have nginx proxying to apache as a backend in order for nginx to handle static assets. Unfortunately when I attempt to visit a "pretty url" it just displays the index page. nginx config server { ...
0
votes
0answers
36 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
30 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 ...
-1
votes
1answer
40 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 ...
0
votes
1answer
13 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
1answer
57 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 ...
1
vote
0answers
21 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
70 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
24 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
110 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
50 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
21 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
17 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
1answer
36 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
22 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
17 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
25 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
35 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
21 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 ...
0
votes
0answers
76 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
40 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
89 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
18 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
48 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
17 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
21 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
44 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
96 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
177 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
21 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
25 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
26 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
66 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 ...