I’m new to tinkering with redirects through the .htaccess file but I have tried for hours to get this right but no go…
I’ve got “temp” urls showing up in Google. In hindsight I should have blocked Google while I was building the website but nevertheless I need to 301 them out of “tmp” directory…
for brevity I won’t list all the URL redirects, but if someone could show me where I’m going wrong I’d appreciate it!
I’ve already got the rule working which directs the php page to the SEO friendly URL: “escape-menu”… So, escape-kirkham.co.uk/escape-menu works ok… I just get the ugly display when you key in: escape-kirkham.co.uk/TMP/escape-menu
Take care that 301 redirects are normally cached by browsers, so if you create a rule that doesn’t work and then fix it, it might be that the browser never picks up on this new redirect but keeps on using it’s own cached redirect instead.
To avoid this, start with 302 redirects (temporary, i.e. should not be cached) until it works, and then switch them to 301 redirects.
To clear the cached 301 redirects you may have in the browser now, just clear the cache and restart the browser.
PS. There is no need for all the backslashes in that auto generated RewriteRule; you can remove them all (if you keep using that instead of mod_alias). The RewriteCond is also useless.