I’ve inherited a WordPress site. Have a ton of PHP experience but only moderate WordPress experience.
Currently the URL: http://iridescentlearning.org/technovation
Redirects to another page. My client wants that redirection changed. But I can’t figure out where that redirection is happening.
The .htaccess file has this…
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteEngine on
<IfModule mod_suphp.c>
suPHP_ConfigPath /home/ab6700/public_html/php.ini
<Files php.ini>
order allow,deny
deny from all
</Files>
</IfModule>
…which doesn’t look to me like it does anything.
I’ve looked through all the Settings and can’t see anything that has to do with redirection.
And the page it’s redirecting to, I can’t find anything there that suggests that the page should go to it.
I do see one plugin called “Better Anchor Links” but it’s been deactivated.
So where is this redirection happening from?
If the page
http://iridescentlearning.org/technovation/
doesn’t actually exist in that location and returns a 404, WordPress will attempt to find a matching page of the same name and redirect to that URL via theredirect_canonical()
function. Look at that function in source starting with the lineis_404
. You can see the same thing happening by using the slug of any page but getting the path wrong, for example: http://iridescentlearning.org/donate/Like any other PHP site, it can happen anywhere in the code or the server config. It’s also possible that WordPress is doing it automatically if there’s another page on the site with that name.
I would check, in this order,
If it’s in none of these places, I’d say it’s safe to add your own redirect, using a plugin or .htaccess.