Moving Site from 1 server to other

Permalink
Hello,

I am doing a test to move a site from cpanel to cloud CWP server. I was able to move all files and database, but now the problem I am facing is only home page is working and all other links shows 404 Page not found for e.g abc.com works but abc.com/contact does not work, also if I put index.php after domain name than it works, like abc.com/index.php/contact works.

I checked the form and the first option was to disable pretty URLS but over here the problem is I am not able to login in dashoard, as when I go to abc.com/index.ph/login it shows login page but after entering credentials when I press login button again it goes to 404 Page not found .

Following is the htaccess code on server

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/index.php$
RewriteCond %{REQUEST_URI} !\.(gif|jpe?g|png|css|js)$
RewriteRule .* /index.php [L,R=302]
</IfModule>

 
mnakalay replied on at Permalink Reply
mnakalay
If pretty URLs are activated your htaccess should contain
<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME}/index.html !-f
   RewriteCond %{REQUEST_FILENAME}/index.php !-f
   RewriteRule . index.php [L]
</IfModule>

And it's also best practice to empty the cache when you move website. I you didn't do that, manually empty the folder aplication\files\cache