Forum Moderators: phranque
I would like all posts in the subfolder /forum/ to redirect to www.example.com/forums/
Returning a code other than 404 or 410 for a non-existent page (or redirecting users to another page, such as the homepage, instead of returning a 404) can be problematic.
100,000 hard 404 errors
you could specify this within a <Location> scope
The .htaccess file contains only the following text:
ErrorDocument 404 http://www.example.com/forum-404/
Now, when I go to www.example/forum/ I get the following error:
Index of /forum
Parent Directory
What am I doing wrong here? Any ideas?
Options -Indexes RewriteCond %{REQUEST_URI} !-d RewriteRule ^forum/ - [L] RewriteRule ^forum/ - [G]
Options -Indexes
RewriteRule ^forum/ - [L]
ErrorDocument 404 ^/forum-404.php
RewriteCond %{REQUEST_URI} !-d ErrorDocument 404 ^/forum-404.php
RewriteCond %{REQUEST_URI} !-d
However, now when I go to example.com/forum or example.com/forum/post, I get redirected to the regular WP 404.php. I would like 404s in this directory to be sent to forum-404.php, which I have just set up in my child theme. Any idea what I'm doing wrong?
ErrorDocument 404 /forum/forum-404.php ErrorDocument 404 /boilerplate/forum-404.php Options blahblah
RewriteRule blahblah
ErrorDocument blahblah
RewriteCond blahblah