The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
28 views

Redirect wildcard subdomain to same subdomain on different domain

I have a domain with dynamic subdomains. The domain, unfortunately, has changed. As such I need to redirect *.domain1.com to *.domain2.com while keeping the subdomains the same. I have looked ...
-1
votes
1answer
31 views

symlink to PHP file not handled as PHP

I have PHP5 installed on an Ubuntu 14.04 server and it works fine. I create a file called foo.php anywhere in the document tree and it gets passed to the PHP interpreter just as you'd expect. ...
0
votes
1answer
400 views

The Alias directive will probably never match because it overlaps an earlier Alias

Ok, not sure why this is occuring. So, I get the message The Alias directive in /etc/httpd/conf.d/awstats.conf at line 3 will probably never match because it overlaps an earlier Alias. and The ...
0
votes
0answers
41 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
62 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
69 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
172 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
119 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 ...
1
vote
1answer
335 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> ...
3
votes
2answers
3k 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
140 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
238 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
137 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
123 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
305 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
973 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
360 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
471 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
572 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
52 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
243 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
189 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
2answers
3k 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
164 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
114 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
7k 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
115 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
891 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
842 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 ...