如何使用htaccess重写具有双目录名的url?

时间:2022-01-15 11:08:58

I'm having a hard time rewriting the following url:

我很难重写以下网址:

http://example-url.com/example-url.com/anythinggoeshere

to:

http://example-url.com/anythinggoeshere

I tried this:

我试过这个:

RedirectMatch 301 example-url.com/example-url.com(.*) example-url.com$1 

But it's not doing anything...

但它没有做任何事情......

Your help is much appreciated!

非常感谢您的帮助!

1 个解决方案

#1


I solved my issue by doing the following:

我通过执行以下操作解决了我的问题:

Redirect 301 /example-url.com http://example-url.com

#1


I solved my issue by doing the following:

我通过执行以下操作解决了我的问题:

Redirect 301 /example-url.com http://example-url.com