Regex redirect
-
Hi
The person that set up our site set up wordpress in the directory /cms/….. and when live moved it to /…… causing a lot of 404 errors, im using redirect regex as follows:Source URL /cms/(.*)
Target URL: https://www.domainname.co.uk/$1This works fine, with one exception:
https://www.domainname.co.uk/wp-admin.php and
https://www.domainname.co.uk/wp-login/php current redirect to
https://www.domainname.co.uk/cms/wp-admin.phpWhen using the script above the login redirects to
https://www.domainname.co.uk/wp-admin.php which doesnt exist and therefore buggers up the admin loginI trried to add an extra redirect before the above script to redirect the above pages to the /cms/ version and placed these before the first script hoping the redirects would stop when there was a match but this didnt work. Is ther4e any way to exclude this one address from the original script?
- The topic ‘Regex redirect’ is closed to new replies.