301 Redirect not working - CyberPanel/OLS

19 views
Skip to first unread message

Hilas

unread,
Jun 18, 2022, 2:25:54 AMJun 18
to OpenLiteSpeed Development
Hey everyone,

I've tried multiple ways, but my .htaccess file isn't performing the redirect I want. It simply does nothing.

I would like to redirect a page from:

> https://domain.com/homepage/discussions/62-info/

To:

> https://domain.com/homepage/newinfopost/

These are the last pieces of code I've tried, but no luck:

> RewriteRule /homepage/discussions/62-info/$ https://domain.com/homepage/newinfopost/$1 [L,R=301]

> RewriteRule /homepage/discussions/62-info/$ /homepage/newinfopost/$1 [L,R=301]

> RewriteRule ^/?homepage/discussions/62-info/(.*)$ https://domain.com/homepage/newinfopost/$1 [L,R=301]

I have also restarted OLS every time I made a change to .htaccess through CyberPanel. Didn't change a thing.
Reply all
Reply to author
Forward
0 new messages