Php 更改Magento 2.1.9上的Magento联系人页面URL
我认为Magento 2.1改变了修改联系人页面url的方式。 以前的教程已经不起作用了,比如:() 也许我也做错了什么 有人能帮我吗 如有任何回应,我将不胜感激Php 更改Magento 2.1.9上的Magento联系人页面URL,php,magento,magento2.1,Php,Magento,Magento2.1,我认为Magento 2.1改变了修改联系人页面url的方式。 以前的教程已经不起作用了,比如:() 也许我也做错了什么 有人能帮我吗 如有任何回应,我将不胜感激 您需要覆盖vendor\magento\module contact\etc\frontend\文件夹中的routes.xml文件 从 <code> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchema
您需要覆盖
vendor\magento\module contact\etc\frontend\
文件夹中的routes.xml文件
从
<code>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="standard">
<route id="contact" frontName="contact">
<module name="Magento_Contact" />
</route>
</router>
</config>
</code>
致:
您可以使用.htacess编写以下代码
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.net/$1 [L,R=301,NC]
or you can do with admin panel also
或
第一步->转到管理->营销->搜索引擎优化->url重写根据您的要求更改url是的,您是对的。可以创建静态块并放置接触块。在那之后,创建一个接触类别,并在这个类别中分配静态块。我认为它可以工作,但要做一件简单的事情还有很长的路要走。你知道一些不同的东西吗?谢谢你的时间。我试过你的教程,但它不工作。请记住,我不想重定向url,我想更改url。无论如何谢谢你
<code>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="standard">
<route id="YOUR_Choice" frontName="YOUR_Choice">
<module name="Magento_Contact" />
</route>
</router>
</config>
</code>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.net/$1 [L,R=301,NC]
or you can do with admin panel also