skip to Main Content

Redirect WordPress internal files to 404 page

I have a WordPress installation at mydomain.com/blogs and I have the following .htaccess RewriteEngine On RewriteBase /blogs/ RewriteBase / RewriteRule ^index.php$ - [L] ErrorDocument 404 /blogs/ # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] #RewriteBase / #RewriteRule…

VIEW QUESTION

.htaccess rewriteCond part of the url – Apache

URL applying rule(s): https://olddomain.ch/de/qahmkitd73/ https://olddomain.ch/fr/qahmkitd73/ https://olddomain.ch/en/qahmkitd73/ RewriteCond %{HTTP_HOST} chezcamillebloch.ch$ RewriteCond %{REQUEST_URI} ^/.*/qahmkitd73/$ [NC] RewriteRule .* https://newdomain.ch/$1/qahmkitd73 [NE,R=301,L] this should redirect to https://newdomain.ch/**/qahmkitd73 the ** should be dynamic from the URL (de/ or en/ or fr/)

VIEW QUESTION
Back To Top
Search