• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Redirecting

tapupartforpres

New Pleskian
Hello All,

New here, any help would be appreciated. I have looked around for quite a bit, not to waste anyones time.

This should be a simple one for all.

Windows / Plesk server (I come in peace from Linux land).

A customer has a custom build CMS, that is commented very poorly. That is not here nor there. But the customer went in and deleted a whole category and directory called, www.domain.com/products/durable-sofas-loveseats--chairs/ . There were a ton of other products in that directory that are gone now (they did not let me know).

So essentially I wanted to redirect that whole directory to this directory, www.domain.com/products/

I have tried .htaccess in the root https folder in various configurations with no avail.

Can anyone help and point me in the right direction.

Thank you so much for your time, I bet for everyone here this is a breeze.
 
Was that an actual directory or was it a URL routed by the CMS?

If it's an actual directory, you could use .NET's Response.Redirect() or Response.RedirectPermanent() inside a Default.aspx file.

A better approach would be to use a web.config with a IIS URL rewrite directive, especially if you're looking to catch more than a single entry point.
 
Hey Ales!

Thanks for the reply.

When I view the products directory, it looks like the CMS created a virtual directory. When I look in the "Products" folder on the server, all I see are these files:

_Detail.aspx
Detail.aspx
Index.aspx

So would you recommend using a web.config with an IIS URL rewrite directive, in THAT "Product" directory? If so is there any documentation you have to do what I need achieved?

Thank you so much for your time. Wish I knew this better.

Thanks!!!
 
Well, I guess this was to be expected, your CMS is rewriting the URL. At this point I'm not sure what to suggest. I'd normally look at the CMS documentation and code first, to try to understand what is being done. The top level web.config would be a good place to start looking.

I can't really suggest any specific documentation about the IIS URL rewrite from the top of my head, but there has been a lot written about it. Just try something simple first and go from there...
 
Back
Top