George Mylonas George Mylonas - 1 year ago 192
Apache Configuration Question

Rewrite URL on .htaccess

I have urls like
and I need to redirect to
everything that starts with

At the moment I have done this

redirect 301 /de

and it redirect all links but just removing
part and result is

How to fix this?


Answer Source

redirect directive matchs rest of the uri and appends it to the target, you can use RedirectMatch to redirect a specific uri

redirectMatch 301 ^/de/?
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download