cancel
Showing results for 
Search instead for 
Did you mean: 

URL Rewrite not working

URL Rewrite not working

 

Hi,

I've been trying to create a custom URL rewrite on Magento 2.

The store URLs are currently showing in the format kadro_store/store/view/id/1/, and I'm trying to create a permanent redirect to a "cleaner", more SEO-friendly URL. I've enabled web server rewrites in the Admin -> Configuration, but there when I navigate to the kadro_store/store/view/id/1/ URL, nothing is happening.

Any ideas of what I'm doing wrong?

Thank you!

3 REPLIES 3

Re: URL Rewrite not working

Hi @doinablueldbb4 

 

Try below steps, it may help you:

  • Configuration >> General >> Web >> Search Engine Optimization >> Use Web Server Rewrites: Yes
  • Configuration >> Catalog >> Search Engine Optimization >> Use Categories Path for Product URLs: Yes
  • Configuration >> Catalog >> Search Engine Optimization >> Use Canonical Link Meta Tag For Categories: No
  • Configuration >> Catalog >> Search Engine Optimization >> Use Canonical Link Meta Tag For Products: Yes

    Problem solved? Click on 'Kudos' & Accept as Solution!
Problem solved? Click Accept as Solution!

Re: URL Rewrite not working

27 I have just moved my website to new computer which uses IIS 8 from one has IIS 7.5. All but URL rewriting is working well. there is no error message than "HTTP Error 404.0 - Not Found" which I got. What I've only recognized is, there is an entry like RewriteModule (%SystemRoot%\system32\inetsrv\rewrite.dll) in website>modules setting page but, IIS 8 one has no same module. Even though I added same module to IIS 8, It didn't work. I'll be glad if I can have some suggestion about how to solve the problem. More info could be provided upon request.. Hope I could expressed what i mean properly.! Thanks in advance, alper ps: url rules work well..

Re: URL Rewrite not working

I set up some rewrite rules, and they didn't work at all. Instead of redirecting to the new URL, I just got a 404 error. IIS didn't seem to even notice that the rules existed. As per I tried to turn on Failed Request Tracing to get more details, but found no option for Rewrite in the WWW Server Provider Property Areas. This made me wonder if something was not installed properly. However, I found some indications online that this could be due to installing Url Rewrite Module after IIS. Therefore, I went and manually modified the C:\Windows\System32\inetsrv\config\applicationHost.config to contain the needed area. Still all I got was a 404 error, and in the trace, lots of details about the 404 error. I thought, "Hmm, well why don't I just reinstall the Rewrite Module 2.0 from the ground up?" I loaded the Web Platform Installer and noticed that it was installed, but no way to remove it. I went to Control Panel > Programs, clicked "Turn Windows features on or off", and nothing related to Rewrite Module seemed to be there. Finally I thought to look under the standard programs list in Programs and Features. There it was: IIS URL Rewrite Module 2. I right click and choose "Repair". Immediately things started working as they were supposed to. Talk about waiting until the last step to try the simplest solution. Ah well, such is life some days.