Magento 2: Redirect from Category Page to CMS Page
I already gone through How to redirect a category to another link
Still i have issue. In my .htaccess
, in <IfModule mod_rewrite.c>
before end of </IfModule>
i wrote
Redirect 301 /subcart/product.html http://localhost/magento2/testcmspage
magento2 category cms redirect htaccess
add a comment |
I already gone through How to redirect a category to another link
Still i have issue. In my .htaccess
, in <IfModule mod_rewrite.c>
before end of </IfModule>
i wrote
Redirect 301 /subcart/product.html http://localhost/magento2/testcmspage
magento2 category cms redirect htaccess
Did you tried in URL rewrite management?
– saravanavelu
Nov 7 '16 at 8:37
Yes. I tried. But it's giving same error as mentioned in reference link. So no other way apart fromhtaccess
– Ankit Shah
Nov 7 '16 at 8:38
yes. You have to change the product.html which is existing already to other one and create the new URL rewrite for product.html. I also got the same error in URL rewrite. Then I changed the existing URL and the redirection is working
– saravanavelu
Nov 7 '16 at 8:47
Can you please post your detailed answer with explanation please
– Ankit Shah
Nov 7 '16 at 8:56
add a comment |
I already gone through How to redirect a category to another link
Still i have issue. In my .htaccess
, in <IfModule mod_rewrite.c>
before end of </IfModule>
i wrote
Redirect 301 /subcart/product.html http://localhost/magento2/testcmspage
magento2 category cms redirect htaccess
I already gone through How to redirect a category to another link
Still i have issue. In my .htaccess
, in <IfModule mod_rewrite.c>
before end of </IfModule>
i wrote
Redirect 301 /subcart/product.html http://localhost/magento2/testcmspage
magento2 category cms redirect htaccess
magento2 category cms redirect htaccess
edited Apr 13 '17 at 12:55
Community♦
1
1
asked Nov 7 '16 at 7:28
Ankit ShahAnkit Shah
4,710862140
4,710862140
Did you tried in URL rewrite management?
– saravanavelu
Nov 7 '16 at 8:37
Yes. I tried. But it's giving same error as mentioned in reference link. So no other way apart fromhtaccess
– Ankit Shah
Nov 7 '16 at 8:38
yes. You have to change the product.html which is existing already to other one and create the new URL rewrite for product.html. I also got the same error in URL rewrite. Then I changed the existing URL and the redirection is working
– saravanavelu
Nov 7 '16 at 8:47
Can you please post your detailed answer with explanation please
– Ankit Shah
Nov 7 '16 at 8:56
add a comment |
Did you tried in URL rewrite management?
– saravanavelu
Nov 7 '16 at 8:37
Yes. I tried. But it's giving same error as mentioned in reference link. So no other way apart fromhtaccess
– Ankit Shah
Nov 7 '16 at 8:38
yes. You have to change the product.html which is existing already to other one and create the new URL rewrite for product.html. I also got the same error in URL rewrite. Then I changed the existing URL and the redirection is working
– saravanavelu
Nov 7 '16 at 8:47
Can you please post your detailed answer with explanation please
– Ankit Shah
Nov 7 '16 at 8:56
Did you tried in URL rewrite management?
– saravanavelu
Nov 7 '16 at 8:37
Did you tried in URL rewrite management?
– saravanavelu
Nov 7 '16 at 8:37
Yes. I tried. But it's giving same error as mentioned in reference link. So no other way apart from
htaccess
– Ankit Shah
Nov 7 '16 at 8:38
Yes. I tried. But it's giving same error as mentioned in reference link. So no other way apart from
htaccess
– Ankit Shah
Nov 7 '16 at 8:38
yes. You have to change the product.html which is existing already to other one and create the new URL rewrite for product.html. I also got the same error in URL rewrite. Then I changed the existing URL and the redirection is working
– saravanavelu
Nov 7 '16 at 8:47
yes. You have to change the product.html which is existing already to other one and create the new URL rewrite for product.html. I also got the same error in URL rewrite. Then I changed the existing URL and the redirection is working
– saravanavelu
Nov 7 '16 at 8:47
Can you please post your detailed answer with explanation please
– Ankit Shah
Nov 7 '16 at 8:56
Can you please post your detailed answer with explanation please
– Ankit Shah
Nov 7 '16 at 8:56
add a comment |
2 Answers
2
active
oldest
votes
Try this,
1) Under Marketing-> URL rewrites search products.html
under Request Path
column. Then edit that and change the request path URL as products-old.html and then click save.
2) Create the new URL rewrite as like below screenshot and then click save.
Nope it's not working for Me. It's adding that value but on frontend it's not redirecting
– Ankit Shah
Nov 7 '16 at 9:15
Did you tried reindex and clearing cache and generation folders?
– saravanavelu
Nov 7 '16 at 9:25
Yes i already tried
– Ankit Shah
Nov 7 '16 at 9:26
add a comment |
the trick to this is:
- Go to ROOT folder of magento 2
- Open .httaccess file
Add following line (IMPORTANT!!! MAKE SURE TO ADD IT TO BEGINING
OF THE FILE, FIRST LINE IS BEST, OTHERWISE IT WILL NOT WORK, Replace the first link with your category link and second the page you wish to redirect to):
RewriteRule catalog/category/view/s/example/id/213/ https://example.com/example [L,R=301]
Save and enter following commands in the command tool:
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush
I was fighting with this, but all this time the trick was to add the line at the beggining of the .htaccess file. I was adding it at the end (last line)
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f144437%2fmagento-2-redirect-from-category-page-to-cms-page%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try this,
1) Under Marketing-> URL rewrites search products.html
under Request Path
column. Then edit that and change the request path URL as products-old.html and then click save.
2) Create the new URL rewrite as like below screenshot and then click save.
Nope it's not working for Me. It's adding that value but on frontend it's not redirecting
– Ankit Shah
Nov 7 '16 at 9:15
Did you tried reindex and clearing cache and generation folders?
– saravanavelu
Nov 7 '16 at 9:25
Yes i already tried
– Ankit Shah
Nov 7 '16 at 9:26
add a comment |
Try this,
1) Under Marketing-> URL rewrites search products.html
under Request Path
column. Then edit that and change the request path URL as products-old.html and then click save.
2) Create the new URL rewrite as like below screenshot and then click save.
Nope it's not working for Me. It's adding that value but on frontend it's not redirecting
– Ankit Shah
Nov 7 '16 at 9:15
Did you tried reindex and clearing cache and generation folders?
– saravanavelu
Nov 7 '16 at 9:25
Yes i already tried
– Ankit Shah
Nov 7 '16 at 9:26
add a comment |
Try this,
1) Under Marketing-> URL rewrites search products.html
under Request Path
column. Then edit that and change the request path URL as products-old.html and then click save.
2) Create the new URL rewrite as like below screenshot and then click save.
Try this,
1) Under Marketing-> URL rewrites search products.html
under Request Path
column. Then edit that and change the request path URL as products-old.html and then click save.
2) Create the new URL rewrite as like below screenshot and then click save.
answered Nov 7 '16 at 9:08
saravanavelusaravanavelu
3,00562144
3,00562144
Nope it's not working for Me. It's adding that value but on frontend it's not redirecting
– Ankit Shah
Nov 7 '16 at 9:15
Did you tried reindex and clearing cache and generation folders?
– saravanavelu
Nov 7 '16 at 9:25
Yes i already tried
– Ankit Shah
Nov 7 '16 at 9:26
add a comment |
Nope it's not working for Me. It's adding that value but on frontend it's not redirecting
– Ankit Shah
Nov 7 '16 at 9:15
Did you tried reindex and clearing cache and generation folders?
– saravanavelu
Nov 7 '16 at 9:25
Yes i already tried
– Ankit Shah
Nov 7 '16 at 9:26
Nope it's not working for Me. It's adding that value but on frontend it's not redirecting
– Ankit Shah
Nov 7 '16 at 9:15
Nope it's not working for Me. It's adding that value but on frontend it's not redirecting
– Ankit Shah
Nov 7 '16 at 9:15
Did you tried reindex and clearing cache and generation folders?
– saravanavelu
Nov 7 '16 at 9:25
Did you tried reindex and clearing cache and generation folders?
– saravanavelu
Nov 7 '16 at 9:25
Yes i already tried
– Ankit Shah
Nov 7 '16 at 9:26
Yes i already tried
– Ankit Shah
Nov 7 '16 at 9:26
add a comment |
the trick to this is:
- Go to ROOT folder of magento 2
- Open .httaccess file
Add following line (IMPORTANT!!! MAKE SURE TO ADD IT TO BEGINING
OF THE FILE, FIRST LINE IS BEST, OTHERWISE IT WILL NOT WORK, Replace the first link with your category link and second the page you wish to redirect to):
RewriteRule catalog/category/view/s/example/id/213/ https://example.com/example [L,R=301]
Save and enter following commands in the command tool:
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush
I was fighting with this, but all this time the trick was to add the line at the beggining of the .htaccess file. I was adding it at the end (last line)
add a comment |
the trick to this is:
- Go to ROOT folder of magento 2
- Open .httaccess file
Add following line (IMPORTANT!!! MAKE SURE TO ADD IT TO BEGINING
OF THE FILE, FIRST LINE IS BEST, OTHERWISE IT WILL NOT WORK, Replace the first link with your category link and second the page you wish to redirect to):
RewriteRule catalog/category/view/s/example/id/213/ https://example.com/example [L,R=301]
Save and enter following commands in the command tool:
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush
I was fighting with this, but all this time the trick was to add the line at the beggining of the .htaccess file. I was adding it at the end (last line)
add a comment |
the trick to this is:
- Go to ROOT folder of magento 2
- Open .httaccess file
Add following line (IMPORTANT!!! MAKE SURE TO ADD IT TO BEGINING
OF THE FILE, FIRST LINE IS BEST, OTHERWISE IT WILL NOT WORK, Replace the first link with your category link and second the page you wish to redirect to):
RewriteRule catalog/category/view/s/example/id/213/ https://example.com/example [L,R=301]
Save and enter following commands in the command tool:
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush
I was fighting with this, but all this time the trick was to add the line at the beggining of the .htaccess file. I was adding it at the end (last line)
the trick to this is:
- Go to ROOT folder of magento 2
- Open .httaccess file
Add following line (IMPORTANT!!! MAKE SURE TO ADD IT TO BEGINING
OF THE FILE, FIRST LINE IS BEST, OTHERWISE IT WILL NOT WORK, Replace the first link with your category link and second the page you wish to redirect to):
RewriteRule catalog/category/view/s/example/id/213/ https://example.com/example [L,R=301]
Save and enter following commands in the command tool:
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush
I was fighting with this, but all this time the trick was to add the line at the beggining of the .htaccess file. I was adding it at the end (last line)
answered Jan 20 at 21:45
Denis AliDenis Ali
13
13
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f144437%2fmagento-2-redirect-from-category-page-to-cms-page%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did you tried in URL rewrite management?
– saravanavelu
Nov 7 '16 at 8:37
Yes. I tried. But it's giving same error as mentioned in reference link. So no other way apart from
htaccess
– Ankit Shah
Nov 7 '16 at 8:38
yes. You have to change the product.html which is existing already to other one and create the new URL rewrite for product.html. I also got the same error in URL rewrite. Then I changed the existing URL and the redirection is working
– saravanavelu
Nov 7 '16 at 8:47
Can you please post your detailed answer with explanation please
– Ankit Shah
Nov 7 '16 at 8:56