Forum
Change the directory of my Shop
I need to change the directory name of shop to dog-agility-equipment but I can't get it to work.
I have re-named the folder and changed the Product Page Path to /dog-agility-equipment/{productSlug} but I can't see anywhere in the settings to change the main directory for the shop but trying to link using the path above with an existing product (obviously replacing productSlug with the actual URL Slug) and that isn't working either.
What am I missing?
How is it not working? What happens?
Just getting page not found - The requested URL /dog-agility-equipment ....
Or do I need to keep the directory as shop and use .htaccess to redirect (don't want to have to do this just for a directory name if I can help it)?
Have you moved the files to the new location?
I didn't create a new directory, I just changed the name of the shop directory so I didn't need to move any files. Unless I need to also rename the other directories (i.e. in the templates folder).
No, that's all you need to do. So when you get a 404, what's the URL and what should it be?
I have it on my local server at the moment so it is localhost:8888/dog-agility-equipment/ for the index page within the shop and an example when viewing product details is localhost:8888/dog-agility-equipment/competition-dog-walk-with-slats.
Both of which produce a 404.
It all works fine when I leave the directory as 'shop' (which I have had to revert to for the moment as I am still developing)
Do you have any rewrite rules in place?
No, I suppose that is what I was asking - I presumed by changing it in the settings it would create the rewrite rules for me.
Well you shouldn't need any rewrite rules for localhost:8888/dog-agility-equipment/ to work.
That that URL doesn't work it sounds like you have a fundamental web server configuration issue.
I shouldn't have a server issue as I did exactly the same process with the blog on my own site (i.e. changed the folder and path name from blog to advice) and it worked on my local server as expected which is why I don't understand why the re-naming of the shop on my client's site isn't working.
We don't understand either, but it doesn't sound like a Perch issue. If there is a page there and it is 404-ing there is nothing in Perch that would cause that, that's the server giving you a 404.
OK, thanks. I will try again and see if I can get to the bottom of it :)