Re: I need help with a rewrite request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I just was rereading the Multiview definition again, for the umpteenth time, and noticed that it may not work for my problem. The original URL is https://school.northwestern.edu/faculty/name/ and the file that exists URL is https://school.northwestern.edu/faculty/name.html. Notice that the original URL ends in a slash so it appears as a directory and not a file. The target of the rewrite or redirect is one directory level up in a file with the name of the terminating directory in the original but has a name ending in .html.

 

Darryl Baker

Northwestern University

 

From: Darryl Philip Baker <darryl.baker@xxxxxxxxxxxxxxxx>
Reply-To: Apache httpd Users <users@xxxxxxxxxxxxxxxx>
Date: Wednesday, September 28, 2022 at 11:47 AM
To: Apache httpd Users <users@xxxxxxxxxxxxxxxx>
Subject: Re: [users@httpd] I need help with a rewrite request

 

Thank you Frank.

That does look like it will do exactly what I want it to do. I am having trouble implementing it. In our development instance I created a .htaccess file with:

<IfModule mod_negotiation.c>

                Options +MultiViews

</IfModule>

But when I try to browse to that directory I get a 500 error. I checked and mod_negotiation is loaded globally. So what am I doing wrong?

 

I am planning on implementing it as part of a Directory definition in my  production environment.

 

Darryl Baker, GSEC, GCLD  (he/him/his)

Sr. System Administrator

Distributed Application Platform Services

Northwestern University

4th Floor

2020 Ridge Avenue

Evanston, IL  60208-0801

darryl.baker@xxxxxxxxxxxxxxxx

(847) 467-6674

 

From: Frank Gingras <thumbs@xxxxxxxxxx>
Reply-To: Apache httpd Users <users@xxxxxxxxxxxxxxxx>
Date: Wednesday, September 28, 2022 at 8:53 AM
To: Apache httpd Users <users@xxxxxxxxxxxxxxxx>
Subject: Re: [users@httpd] I need help with a rewrite request

 

You don't need to use mod_rewrite, a simpler solution is to use multiviews:

 

 

On Wed, 28 Sept 2022 at 09:18, Darryl Philip Baker <darryl.baker@xxxxxxxxxxxxxxxx> wrote:

I have just received a request to rewrite everything http://school.northwestern.edu/faculty/name/ to http://school.northwestern.edu/faculty/name.html I believe I can bury this rule in a directory declaration for the faculty directory but I am having problems writing the exact rules to make the transform happen. My stumbling block is I do very few new rewrite rules. Most are simple modifications of existing rules. Please help.

 

Darryl Baker, GSEC, GCLD  (he/him/his)

Sr. System Administrator

Distributed Application Platform Services

Northwestern University

4th Floor

2020 Ridge Avenue

Evanston, IL  60208-0801

darryl.baker@xxxxxxxxxxxxxxxx

(847) 467-6674


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux