CyberHosting

Htaccess Redirect Errors With OpenLiteSpeed (OLS) Rewrite Rules

edited April 2018 in Web Server

Hi everyone.

I installed CyberPanel and moved my site. I was using RedirectMatch with my links that changed.

But with OLS rewrite rules I cant use this. Is not there RedirectMatch on OLS? Or may I do some changes on codes.

I was using this codes for redirecting main extension and all sub extensions with any cpanel hostings.

RedirectMatch abc/(.+) https://your-domain.com/def/$1 [R=301,L]
RedirectMatch abc/$ https://your-domain.com/def/ [R=301,L]

With this codes I could redirect "abc link" to "def" and automatically all "abc sub extensions" to "def sub extensions".

For example:

/abc => /def
/abc/a => /def/a
/abc/a/b => /def/a/b

But with CyberPanel and OLS RedirectMatch is not working for me. I always take search console errors with 404 about changed and not redirected links.

On OpenLiteSpeed forum I saw a RewriteRule redirect like this:
(RewriteRule phpinfo.php /2/phpinfo.php) but this is not working, too.

Google Bots started to go back to the old links - extensions. So redirects are not working no longer.

Thanks.

Comments

Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!