Hi everyone,

I'm trying to transfer my drupal 8 site from my Windows PC to another one. When I connect wamp, I get the homepage of my site but i get the error "Page not found" when I try to click on a link. I think that it is a question of clean URLs but i didn't find how to process correctly and all the solutions I have tried didn't work.
I have only copy the website folder to the second Windows PC and i have exported the database but it's not working.
I am working with Apache 2.4.9 and i have enabled rewrite_module.

Thank you in advance because i am stuck since 3 weeks..

Comments

VM’s picture

the question does not pertain to installation. The install routine worked else you won't have a site to move. Please edit the opening post and move it to the 'post installation' forum. Thank you.

B8ted’s picture

First of all thank you for your answer !
I have corrected the category of forum for this topic.

Yes the rewrite module is enabled in WAMP. I can't actually disable clean URLs since I am working with Drupal 8 but I had emptied and clear the cache tables using configuration > performance > Clear all caches

VM’s picture

if clearing the cache did not correct the issue, make sure the .htaccess file is included in the root of the drupal site. Often times files that begin with a . are hidden.

If you are sure the .htaccess file is ok, then the issue is likely within the environment itself ie: whether the environment is properly set up to allow use of cleanurls.

https://www.drupal.org/getting-started/clean-urls

B8ted’s picture

Hi,

I have tryed to do a random link like this http://localhost/ima/?q=admin/node/75, but i get stuck on the home page...
About the .htaccess file i don't really understand what to do .. sorry. I have a lot of different files with this name in my wamp folder..

VM’s picture

make sure the .htaccess file is included in the root of the drupal site.

I'm not asking about .htaccess in your WAMP folder. Drupal ships with one that is necessary. You can look at a new download if necessary. It will reside in the same folder as your index.php for drupal. Don't do anything with it. Just confirm that it is there and it is the one that ships with Drupal. You can open it with a text editor.

?q=admin/node/75 isn't a valid path. nodes doesn't typically reside in the admin path and an incorrect path will falls back to the front page.

B8ted’s picture

I have checked C:\wamp\www\mysite and there is a .htaccess file plus a index.php file.

I have tryed other paths including ?q=admin like localhost/mysite/?q=admin/link1 but I still be directed on the home page.

B8ted’s picture

Finally you were right, the .htaccess file was absent from the folder, I have donwloaded the right one and now it's working normally. Thank you very much for your answers and the help provided. Have a good week end

deeray’s picture

Hello, am having the exact problem but Ithis is the only path I can see
C:\wamp64\www\DIR\html
and there is a .htacess file inside the folder...
I am not sure where else to check for a missing .htacess file...
I'll appreciate your help,
Thank you

Bahson’s picture

Had the same issue with wamp after moving a site to another pc and setting RewriteBase /<yoursitename.com> in my .htaccess file (line 123 [drupal 8.5])helped

https://www.drupal.org/docs/8/clean-urls-in-drupal-8/fix-drupal-8-clean-urls-problems