diff options
author | Christian Cleberg <hello@cleberg.net> | 2024-05-01 21:45:52 -0500 |
---|---|---|
committer | Christian Cleberg <hello@cleberg.net> | 2024-05-01 21:45:52 -0500 |
commit | dc1261d703ae1e1a14841b030888e3f87ff7c38f (patch) | |
tree | 71139c9021b09704b2d45be3b64d54e2acbae55f /content/blog/2021-10-09-apache-redirect.md | |
parent | ba6b552c8256cc2e071c910ef7821c82443f1f82 (diff) | |
download | cleberg.net-dc1261d703ae1e1a14841b030888e3f87ff7c38f.tar.gz cleberg.net-dc1261d703ae1e1a14841b030888e3f87ff7c38f.tar.bz2 cleberg.net-dc1261d703ae1e1a14841b030888e3f87ff7c38f.zip |
prettier formatting and rewrap lines
Diffstat (limited to 'content/blog/2021-10-09-apache-redirect.md')
-rw-r--r-- | content/blog/2021-10-09-apache-redirect.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/content/blog/2021-10-09-apache-redirect.md b/content/blog/2021-10-09-apache-redirect.md index 87ea38e..3a03aa9 100644 --- a/content/blog/2021-10-09-apache-redirect.md +++ b/content/blog/2021-10-09-apache-redirect.md @@ -24,10 +24,10 @@ To solve this problem, I really needed to solve two pieces: `/blog/some-post/`. 2. Ensure that no other `.html` files are redirected, such as `index.html`. -After *a lot* of tweaking and testing, I believe I have finally found the +After _a lot_ of tweaking and testing, I believe I have finally found the solution. The solution is shown below. -``` conf +```conf RewriteEngine On RewriteCond %{REQUEST_URI} !\index.html$ [NC] RewriteRule ^(.*).html$ https://example.com/$1 [R=301,L] @@ -41,5 +41,5 @@ following: 3. Find any `.html` files within the website directory and redirect it to exclude the file extension. 4. The final piece is adding the trailing slash (`/`) at the end of the URL - - you'll notice that I don't have an Apache rule for that since Apache - handles that automatically. + you'll notice that I don't have an Apache rule for that since Apache handles + that automatically. |