PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, August 23, 2022

[FIXED] Where does Url rewrites go in Magento 2.4.2? (Programmatically)

 August 23, 2022     magento, magento2, url, url-rewriting     No comments   

Issue

right now I am learning Magento 2.4.2

I have created a page and the url for my page is: http://learningmagento.docker/pages/page/About

But I would like it to be: http://learningmagento.docker/creatuity/why-creatuity

While there are plenty of docs on how to do this programatically all the tutorials seem to be missing the same info. Is this a simple script file or a class? Where does this file belong?

Would anyone be able to answer these questions or provide the proper documentation?


Solution

Is this a simple script file or a class? Where does this file belong?

It's neither a script file or a class. You create rewrites via the Magento 2 admin (usually under the Marketing section). The data for these rewrite objects is stored in the url_rewrite table.

In addition to creating rewrites manually, many Magento features (products, CMS pages) will allow you to set a URL-ish field and Magento will create the data in the url_rewrite table for you.



Answered By - Alan Storm
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing