Directory-level configuration file found mostly on Apache web servers

learn more… | top users | synonyms (1)

0
votes
3answers
937 views

Website with optimal cache control

My goal I would like to let browsers cache my whole website, but only download the new information when I have changed one or more files. My situation After some research I have found a way to do ...
0
votes
0answers
10 views

Howto rewrite http://domain.com/~user to http://domain.com [duplicate]

I'm trying to create a mod_rewrite rule that says any links clicked on my website that refer to http://olddomain.com/~user instead go to http://domain.com - Is this possible?
2
votes
4answers
1k views

how to cache my website?

I have few questions about caching a website, since I haven't tried caching a site before. First is how to cache a site so it will have a faster loading when clients browse the site. For example I ...
-1
votes
1answer
49 views

Forcing HTTP to HTTPS causing 404 error

I have a website based on WordPress, and one section of it is built by external programmers (the backend). I was able to force all connections to go on HTTPS instead of HTTP using a plugin for the ...
1
vote
1answer
58 views

Apache redirect some url to homepage

I am trying to implement a simple rewrite, but looks like i am doing something wrong. What I am trying to do is that I have a url blog.example.com/articles/ which gives me 404 , and other urls are ...
2
votes
5answers
22k views

Redirect all http AND https non-www URLS to https://www.example.com via htaccess

For reasons much too long and complex to get into (it involves several layers of corporate red tape resulting in someone else not purchasing a wildcard SSL certificate I requested), I have to set up a ...
0
votes
1answer
36 views

Redirect permanent vs RedirectMatch, which is better to enforce SSL security in Apache?

I have been using: RedirectMatch /(.*) https://www.website.com/$1 to enforce redirection from virtualhost 80 to 443 in apache. My reasoning is that it makes sense to grab anything that the user ...
0
votes
0answers
83 views

Apache htaccess config not working after upgrading from 2.2 to 2.4

Our document root is /var/www/foo.com/ and in /var/www/foo.com/lodging/ I have this .htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /lodging/ # redirect base lookups to wp cms (...
0
votes
1answer
56 views

mod_rewrite to replace all dots with underscores after path

I've been through all tagged questions here and on SO, but my problem is different because of either/both needing to replace "." with "_" comes after a particular path and I'm running through a ...
0
votes
0answers
49 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
1answer
15 views

Is there an upper hierarchical limit to the .htaccess file placement using virtual hosts?

Question background: I have an Apache 2.4 virtual host environment hosting multiple websites in the following Ubuntu file hierarchy: /var/www/site-1-folder /var/www/site-2-folder /var/www/site-3-...
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 'Access-...
0
votes
0answers
31 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 ...
1
vote
2answers
66 views

htaccess: limit to only certain sub-domains

I have a wildcard ssl setup on Apache for a domain so that I can create any type of sub-domain on the fly. <VirtualHost *:443> DocumentRoot "/var/www/html" ServerName www.domain.com ServerAlias ...
0
votes
0answers
6 views

htaccess rewrite incoming links to new one [duplicate]

I'm having a problem with site migration and old links. Now, its not just a server migration, it was also a CMS migration. Site went from umbraco (asp.net) to wordpress. Problem is that google indexed ...
0
votes
1answer
8 views

.htaccess rewrite exception directories

I need to redirect everything app/webroot because of sructure of cakePHP except 2 folders (beqr and becoupon) which are separate apps my .htaccess for now is: <IfModule mod_rewrite.c> ...
0
votes
0answers
7 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 mysub.noodle....
2
votes
2answers
3k views

Use SetEnv Variable in htaccess Rewrite Rule

In our httpd.conf virtual host block we have SetEnv MAGE_RUN_CODE "v2_us_es" Is it possible to use that variable in a .htaccess file Something like RewriteRule ^sitemap\.xml$ /media/sitemaps/%{...
0
votes
1answer
53 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
15 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
1answer
59 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 "...
1
vote
1answer
155 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] # //...
0
votes
2answers
39 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
0answers
40 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 .* https://www.%{HTTP_HOST}...
0
votes
0answers
30 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 http://my-site.com/...
-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 %{HTTP:X-Forwarded-...
-1
votes
1answer
39 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 ...
0
votes
1answer
33 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 ...
-1
votes
1answer
49 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
36 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
76 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
35 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
1answer
376 views

How to use # in url as a redirect rule in htaccess for apache

I am having a difficult time figuring out how to have the following work: I am trying to redirect a url in htaccess I am trying to redirect from example.com/test.html to example.com/index#test I ...
0
votes
1answer
15 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 %{...
1
vote
1answer
51 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
37 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
31 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 ^post....
0
votes
1answer
58 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 ...
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
2answers
67 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
26 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 www....
1
vote
0answers
84 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
30 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
51 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, www.example....
0
votes
0answers
174 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
2answers
280 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 /related/aiken-sc.htm?tkn=...
0
votes
0answers
35 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
31 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 ...
0
votes
2answers
250 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
515 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 ...