I have several older files that no longer exist, and several whose locations have been changed. I need to specify specific redirects for each of them.
I used to run my website on LAMP which was hosted on a third-party hosting provider's servers. They provided access to the website through cPanel.
Whenever I wanted to do such redirects in cPanel, they had a nifty front-end for specifying the details for which file path to redirect to which target path, and the type of redirect. All of this was stored in a file .htaccess on the root folder.
An entry there looked something like this:
RewriteCond %{HTTP_HOST} ^mywebsite\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mywebsite\.com$
RewriteRule ^file1\.php$ "http\:\/\/www\.mywebsite\.com\/folder1\/file2\.php" [R=301,L]
I have now migrated my entire site to asp.net, and I run it on Windows Server 2008 R2 on IIS7.
Is there a similar feature for this in IIS7? I did some cursory searching on the net, and all I could come up with was the HTTP Redirect feature in IIS Manager, which can only be used for redirecting files that are already on the server. Unlike with my LAMP
website where I could specify redirects for files that didn't exist on the server anymore.
↧
How do I redirect old deleted files to new files on my IIS7 website?
↧