Forum Topic: Redirection With Characters Not Working

Forum: .htaccess Forum : Redirecting • Posted by Yael Miller • Updated:

I want to do a simple redirect. I used your suggestion from this topic. Instead of doing my old way of:

Redirect 301 /projects/ http://www.yaelkmillerdemo.com/portfolio/
Redirect 301 /projects http://www.yaelkmillerdemo.com/portfolio/

I tried the below:

Redirect 301 /projects/?$ http://www.yaelkmillerdemo.com/portfolio/

The redirect didn't work.

I tested my old way and it worked.

2 Replies to “Redirection With Characters Not Working”

Jeff Starr
Posted by Jeff Starr

Try this:

RedirectMatch 301 /projects/?$ http://www.yaelkmillerdemo.com/portfolio/

Basically use Redirect when not using regular expressions and RedirectMatch when regex is involved.

Posted by Yael Miller •

Thanks, Jeff, that worked.