The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
10 views

301 redirect with mod-alias and mod-rewrite

my htaccess file has these lines: RewriteRule ^newlink ?do=something Redirect 301 /oldlink/ /newlink when i write http://www.example.com/oldlink/, browser redirects to ...
0
votes
1answer
46 views

Why isn't my apache alias working?

Here's my vhost in apache 2.4: <VirtualHost *:80> ServerName mailcatcher.dev Alias /mailcatcher.dev.png ...
0
votes
1answer
48 views

mod_alias.c rule to redirect all subdirectories

A mod_alias newbie here. I found the rewrite rule below somewhere and have been using it to block bots and hackers that hit my site, looking for directories like HNAP1, wp, blog, etc. And it works ...
0
votes
1answer
105 views

Linking to items outside of the web root

Here is how the directories are laid out on my server (I inherited this and cannot change at the moment) - /var/www/<stuff for the web> /home/project/src/static/<some CSS, some JavaScript, ...
0
votes
1answer
83 views

Redirect domain/directory to domain2/directory

I would like domain1.com/customers to go to domain2 my home directory public html's folder / customers. Both domains are on different servers. In the folder on the second server/second domain we will ...
0
votes
0answers
27 views

How do I preserve FQDN accross multiple VirtualHost using Redirect (mod_alias)?

I'm trying to use mod_alias - Apache HTTP Server Version 2.4 in order to create simple Redirect, like following: Redirect /123 http://123.%{HTTP_HOST}/123 I have several VirtualHost that are using ...
0
votes
0answers
344 views

Apache Reverse Proxy (Same ProxyPass path but different Destination)

I have a problem here. I am doing reverse proxy for few website in my test server. So , what i have encounter here is that when i request the website from the client , both website request from the ...
1
vote
1answer
224 views

Is it possible to mix Alias and AliasMatch with Apache

I have a generic alias match like: AliasMatch ^/plugins/([^/]*)/(.*) /usr/share/tuleap/plugins/$1/www/$2 <DirectoryMatch "/usr/share/tuleap/plugins/([^/]*)/www/"> ... </DirectoryMatch> ...
2
votes
2answers
2k views

How to check if mod_alias is enabled?

I want to try mod_alias instead of mod_rewrite for a couple of simple redirect rules, but the directives don't seem to be working when entered in .htaccess. Is it possible that mod_alias is not ...
0
votes
1answer
107 views

Using mod_headers to override mod_alias

I am trying to use mod_headers to change Location headers that are being sent via the mod_alias using the Redirect directive but none of them are being re-written. I have the following in my ...
1
vote
2answers
184 views

Alias or redirect or rewrite

Roundcubemail and Owncloud folders live on the document root but because of the limitations of the Roundcube OwnCloud Plug-in I have to organise the vhosts as below. $rcmail_config['owncloud_url'] ...
0
votes
1answer
124 views

Accessing images outside of httpdocs in plesk

I have a website which I am creating for a photographer, she uses dropbox to share images with some of her clients and she wants the clients who do not use dropbox to be able to access the images ...
0
votes
1answer
105 views

Efficient 301 redirects in Apache (www to non-www and vice-versa)?

I came across an article titled "Efficient 301 Redirects." For example, if you are trying to redirect your site from www to non-www domain, the article suggests that when compared to this ...
2
votes
1answer
105 views

Apache: Serving same file on multiple vhosts using regex

I have various virtual hosts (vhosts) setup on an Apache 2.2 server such as: examplea.domain exampleb.domain testsitea.domain testsiteb.domain testsite.domain othersitea.domain On virtual hosts ...
0
votes
2answers
226 views

Create a case-insensitive apache alias

I am currently using Apache 2.4.4. Now, the problem is that when I am creating alias like Alias /mysite "D:/MySite" it doesn't work for http://127.0.0.1/MySite. So how can I make it case ...
1
vote
2answers
778 views

Stylesheets not loading in mediawiki

I'm trying to set up an internal mediawiki site with version 1.19 on RHEL 6.2 with Apache. On loading any wiki page, Mozilla reports Error: The stylesheet ...
0
votes
2answers
268 views

Apache 410 Gone instructions not working with mod_alias nor mod_rewrite

Apache 2.2 (on a server running cPanel) seems to be ignoring instructions to return a 410 status. This happens for both mod_alias's Redirect (using 410 or gone) and mod_rewrite's RewriteRule (using ...
2
votes
1answer
397 views

Redirect an Apache2 SSL VirtualHost with mod_alias

I want to make sure there aren't any mysterious odd behaviors when redirecting a SSL VirtualHost with mod_alias Redirect as outlined by Apache here. My code seems to work, but since SSL virtual hosts ...
1
vote
3answers
498 views

How to redirect multiple domains to “www.” with mod_alias “Redirect” directive?

I'm trying to redirect multiple VirtualHosts without a preceeding "www." from one VirtualHost to another, like so: <VirtualHost *:80> ServerName example.com ServerAlias example.org ...
0
votes
1answer
49 views

single page redirect 301 not working according to the rules in .htaccess

redirect 301 /Produkte/Supplements http://xxx.xx/Produkte/Inhaltsstoffe/Proteine why does this rule also redirects /Produkte/Supplements/xyz to ...
1
vote
1answer
210 views

How would you replace this rewrite rule with a redirect?

This Apache reference page and this wiki clearly states that to achieve simple http to https redirects, mod_alias should be used instead of the more expensive mod_rewrite. I have an Apache ...
3
votes
1answer
167 views

Apache ErrorDocument in an alias

I am trying to set a custom error document in an alias. Alias /f1 "/media/data/www/f1" <Directory "/media/data/www/f1"> AddHandler cgi-script .cgi .pl Options Includes Indexes ...
2
votes
1answer
2k views

apache2 - how to exclude alias from rewrite rules?

I have setup mod_rewrite and mod_alias on Apache2 on Debian (in a test server). I have the following rewrite code in /etc/apache2/sites-available/default: <Directory /> Options ...
0
votes
2answers
151 views

Apache 2.2 logging Redirects

How do I get Apache to log particular Redirects in a separate log file? I have a web site which includes links to an external site. I have been asked to keep track of how often users use these links. ...
1
vote
0answers
110 views

Apache 2.2 RedirectMatch behaviour in a Directory context?

What is the URL provided to a RedirectMatch in a Directory context? Does Apache remove the part of the URL up to the current directory? For context, I am trying to write a RedirectMatch in a ...
5
votes
2answers
6k views

How can I redirect any ServerAlias to the respective ServerName?

I want to 301 redirect all example.org to www.example.org. The following example is doing just that, but it's got a lot of noise to it and is thus hard to maintain and error prone: <VirtualHost ...
1
vote
1answer
113 views

What .htaccess directives do I use to securely redirect www_public to www_my_new_public?

I'm moving a site to a new shared host. I want to have a folder of php includes below the live directory and available to public php pages. What directives should I add to the .htaccess file in ...
0
votes
3answers
863 views

Apache URL rewrite for subdomain pointing to an existing virtual server resource?

I'm trying to point subdomain.example.com to a resource on subdomain2.example.com/?page_id=1 It's a wordpress blog. I'm attempting to give a static page its own subdomain. The point is to basically ...
1
vote
2answers
1k views

How to redirect (or Alias) jump page with Apache

I'm not an Apache expert but need to make a small change to a web server. We are introducing a "jump page" URL that is different from a primary URL (for tracking reasons). /productA/index.html ...
1
vote
4answers
710 views

Redirect 301 fails with a path as destination

I'm using a large number of Redirect 301's which are suddenly failing on a new webserver. We're in pre-production tests on the new webserver, prior to migrating the sites, but some sites are failing ...