A simple .htaccess problem
-
I’ve spent hours trying to figure this problem out, but I think it should be simple for some…
My blog is at toshuo.com/index.php. What I’m trying to do is to set up a rewrite rule so that people can access my blog at “toshuo.com/index”. I do NOT want to move my whole blog structure under /index/. I just want to make it so that people can go to “/index” rather than “/index.php”. Here’s my .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index index.php [PT]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>The only line I added was <b>RewriteRule ^index index.php [PT]</b>. It seems like it should work, but going to https://toshuo.com/index yields a WP 404 error. Any ideas?
PS. I don’t mean to beat a dead horse, but I do NOT want to move all my blog posts, categories and archives under a subdirectory!
PPS. The root, i.e., https://toshuo.com/ is a simple HTML file. I don’t want to move it, either.
- The topic ‘A simple .htaccess problem’ is closed to new replies.