Syndicate content

Why would Redirect and RedirectMatch in Apache2 not work?

As we are working on a new website, we had a problem where a redirect would not work. I tried both: a simple Redirect and a RedirectMatch as follow:

Redirect / http://finball.m2osw.com/
RedirectMatch permanent ^(.*)$ http://finball.m2osw.com$1

Both of these entries would not work at all.

I verified, to make sure, that the alias module was turned on. It was.

ls -l /var/apache2/mods-enabled

This did list the alias.conf and alias.load entries as expected.

So? What else?

Well... This was installed on a new server and we left the default entry in there:

ls -l /var/apache2/sites-enabled

would show:

lrwxrwxrwx 1 root root 35 Feb 11 10:37 000-default.conf -> ../sites-available/000-default.conf

and somehow the default entry had priority over our virtual entry! I think that is because the default had no ServerName entry.

I just deleted the default, because really I don't need all sorts of weird accesses accepted, and it started to work as expected. The RedirectMatch was doing its job.

Syndicate content

Diverse Realty

Diverse Realty Team

Want a New Home?
Want to Sell Your House?

Call Alex at
+1 (916)
220 6482

Alexis Wilke, Realtor
Salesperson
Lic. # 02024063

Cory Marcus, Broker
Lic. # 01079165

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • CSS

    CSS stands for Cascading Style Sheets. The sheets are used to describe the display of your HTML data. It is primarily used in Browsers, although some Graphical Interfaces are starting to make use of basic properties of the CSS. The basics are quite similar to the X11 resources.

  • combo
  • drive
  • gnumake
    A Unix tool used to work on files that are out of date by the GNU Free Software Foundation.
  • keyfile