Please help with 301 redirects in .htaccess file

#1
I'm using cyber panel and ols. I'm trying to add some 301 redirects but can't get them work anyhow. I've tried almost every solution found. Please have a look at the code below im htaccess file and images for cyberpanel and ols setting

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^/index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
# BEGIN Redirects Screenshot 2020-09-29 at 12.20.58 PM.png Screenshot 2020-09-29 at 12.17.47 PM.png
Redirect 301 /old_path/ https://getiosstuff.com/best-free-iphone-ipad-games-kids/
Redirect 301 /old_path/ https://getiosstuff.com/best-zombie-games-for-iphone-ipad/

# END Redirects
 
#3
It doesn't work. Please have a look at the current input in htaccess file and suggest what to change.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

#END Wordpress

# BEGIN Redirects

RewriteRule /the-best-free-zombie-games-for-ipad/ https://getiosstuff.com/best-zombie-games-for-iphone-ipad [R=301]

# END Redirects
 

Cold-Egg

Administrator
#4
How about this

Code:
RewriteRule ^the-best-free-zombie-games-for-ipad https://getiosstuff.com/best-zombie-games-for-iphone-ipad [R=301, L]

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Remember to restart the web server after the rule changed.
 
#8
Hello again,

I need more help. The above rule for regular 404 URLs works just fine. However, I've some old image URLs that I need to redirect to regular posts, which doesn't work. Have a look at the below examples and suggest how to write them. Thanks,

RewriteRule ^wp-content/uploads/2010/11/chart1123.png https://domain.com [R=301, L]
RewriteRule ^wp-content/uploads/2013/10/sine.png https://domain.com/ [R=301, L]
 
#10
Moving the rule on top of the htaccess also doesn't work. It resulted as -
404
Not Found
The resource requested could not be found on this server!
 
#11
I tried to implement the rule with another site and i noticed the site actually shows a 404 error page with the built-in WordPress theme 404-page template and after adding the redirect rule it works fine. However, on other websites it shows as LiteSpeed server 404 error page, and redirect doesn't work.
 
Top