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.

  • Internet Explorer

    Internet Explorer is the browser offered by Microsoft to browse your file system and the Internet. It is based on the old free software called Mosaic. Now it is borrowing parts of other free software such as Konqueror. It first used Visual Basic as a language, now it supports Javascript very well too. It was a great browser in competition with Netscape 5.x from the start (trying to undermine the company named Netscape.)

  • customer
  • fail
  • parameter
  • scan

    In software, scanning means checking the content of memory or a disk for something. In hardware, you have scanners that read the colors on a piece of paper. In the C language, you have a function called sscan() (String Scan,) which I recommend you avoid, but is used to scan the content of a string.