plugin 404 redirect

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hello and good morning,
I have a website in the system of nopcommers
I want to install a 404 redirect plugin or make these references from a system,
How can I do this?
6 years ago
camisa wrote:
Hello and good morning,
I have a website in the system of nopcommers
I want to install a 404 redirect plugin or make these references from a system,
How can I do this?


Is this an existing plugin or are you trying to create on?

Also, 404 is 'page not found'. It is ambiguous with a redirect.
6 years ago
camisa wrote:
Hello and good morning,
I have a website in the system of nopcommers
I want to install a 404 redirect plugin or make these references from a system,
How can I do this?


Maybe you are wanting a plugin which will prevent your visitors from ever seeing the "404 - File not Found" ??

You need to configure "301 Redirects" for your old addresses to point traffic (people and spiders) to automatically take them to the new URL. 301 redirects are "permanent" and instruct the search engines to change the URL they have indexed to the new one.

You can do this yourself if you have access to the Rewrite Module in IIS, or you can manually edit your web.config file to include a rule and referece to a StaticRedirects.config file to include all your old URLs mapped to the new URLs. Or, there's a plugin you can try: https://www.nopcommerce.com/p/1044/redirect.aspx
4 years ago
Hi
I created my redirect, modifying the PageNotFound function in the CommonController class, sample:
string [] myRedirect = _hostingConfig.MyRedirect.Split (';');

If a non-existent link is called ( I can find it in the log file ) , a redirection is made to the new URL,
links non-existent link|new link;
are stored in appsettings.json
Example:
  "Hosting": {
    // Set to ...
       "UseHttpClusterHttps": false,
       "UseHttpXForwardedProto ": false,
       ...    
       "ForwardedHttpHeader": "",
        "MyRedirect": "/S3View/|/S3View/S3View.html;/Signup/signup|/contactus;
          ...
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.