Timeline for .htaccess syntax multiple RewriteEngine on
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 4, 2022 at 21:11 | comment | added | JimLohse | Really good answer thanks for clearing up that the last RewriteEngine wins | |
May 23, 2020 at 21:36 | history | edited | MrWhite | CC BY-SA 4.0 |
Added mention of canonical redirects
|
Apr 19, 2020 at 14:05 | history | edited | MrWhite | CC BY-SA 4.0 |
Added reference link to related question
|
Jan 18, 2017 at 9:31 | history | edited | MrWhite | CC BY-SA 3.0 |
More info about multiple RewriteEngine directives
|
Dec 10, 2015 at 1:54 | history | edited | MrWhite | CC BY-SA 3.0 |
Reworded a few bits, clarified, more explanation.
|
Dec 7, 2015 at 10:25 | comment | added | MrWhite |
The DirectoryIndex is the file that is served when you request a bare directory. eg. When you request example.com/directory/ , it will attempt to serve example.com/directory/index.php , by internally rewriting the request (the URL in the browser's address bar does not change). You don't necessarily need this in .htaccess unless you want to change the default, as it's usually defined in the Apache config. (Incidentally, the Apache default is DirectoryIndex index.html .) You can specify multiple files in this directive and they will be searched for in order.
|
|
Dec 7, 2015 at 9:23 | vote | accept | IXN | ||
Dec 7, 2015 at 9:22 | comment | added | IXN |
I greatly appreciate it! I lost 3 hours till I found by trial and error that space was ruining my redirect. Never noticed the missing / . What does DirectoryIndex index.php do- is it needed?
|
|
Dec 7, 2015 at 9:11 | history | answered | MrWhite | CC BY-SA 3.0 |