.htaccess simple redirect question

I want to set up a link on my wordpress site to redirect all incoming traffic to a (non-existent) url, so it goes to a real url.

I want to this:
to redirect to:

I want to do this with a .htaccess file.

How do I do it and is there a log I can view when testing it?

5 Replies

I forgot to mention: My wordpress runs on apache on ubuntu.

You want a "rewrite"

Why wouldn't a simple "redirect 301 " do the job?

Why wouldn't a simple "redirect 301 " do the job?

I'm assuming myproduct is a placeholder…

-- sw

Yes you are right: "myproduct" is merely a place holder - it's not an actual valid url. I want it to be redirected elsewhere.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct