how to redirect to 404 in .htaccess file ? Example
www.domain.com/ja/any_post or www.domain.com/ja/all_posts
www.domain.com/fr/any_post or www.domain.com/fr/all_posts
A little bit more explaining can't hurt. Example:
My original post is on URL www.domain.com/post
.
I had japanese translation of it at this URL: www.domain.com/ja/post
.
And also French translation: www.domain.com/fr/post
.
I had to delete these translated posts and now when I type www.domain.com/ja/post
to my address bar manually, URL is redirected automatically to original post at www.domain.com/post
. The same goes for /fr/
.
I need URL to stay www.domain.com/ja/post
and show "Not found" for all posts (with /ja/
and /fr/
in URL) without using 301 to 404.php.
Here's my htaccess (WordPress):
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Another thing I forgot to point out.../ja/ and /fr/ don't really exist.