create 301 redirects without the plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 anni tempo fa
We have previously had recurring problems with the 301 redirect plugin causing our page to crash or 401 from the main page.  I'm trying to figure out another way to hard code some 301 redirects?  Maybe into the web.config?  

If so how do I do it?  I've tried the following code which didn't do anything, but I'm not sure if I have the URLrewrite thing installed on my server?

Could you guys tell me if something is wrong with the following code, and also if the code is good tell me how to install URLrewrite on my server?

Or if there is a different way to do all of this I'm open to any suggestions, I just need to get some 301's in place.

Thanks!



   <system.webServer>
                                <rewrite>
                                                <rules>
                                                                <Rule name="301 redirects casey">
                                                                <match url="caseytest" />
                                                                <action type="Redirect" redirectType="Permanent" url="http://www.google.com" />
                                                                </Rule>
                                                </rules>
                                </rewrite>
8 anni tempo fa
assuming your page is something like www.mywebsite.com/caseytest/
Try with this:

<rule name="301 test" stopProcessing="true">
<match url="^caseytest/$" />
<action type="Redirect" url="http://www.google.com" redirectType="Permanent" />
</rule>
8 anni tempo fa
opso wrote:
assuming your page is something like www.mywebsite.com/caseytest/
Try with this:

<rule name="301 test" stopProcessing="true">
<match url="^caseytest/$" />
<action type="Redirect" url="http://www.google.com" redirectType="Permanent" />
</rule>


thanks but that did not work for me?  the site is www.tukshoes.com/caseytest
8 anni tempo fa
Then this one

<rule name="301 test" stopProcessing="true">
<match url="^caseytest$" />
<action type="Redirect" url="http://www.google.com" redirectType="Permanent" />
</rule>
8 anni tempo fa
opso wrote:
Then this one

<rule name="301 test" stopProcessing="true">
<match url="^caseytest$" />
<action type="Redirect" url="http://www.google.com" redirectType="Permanent" />
</rule>


That is still pulling up a basic 404 page?
8 anni tempo fa
Do you have some other redirect rule active?
It is possible that other rules are executed before getting to the one we just added (the first hitted is getting executed).
There is another solution using HTTP redirect http://www.iis.net/configreference/system.webserver/httpredirect
but you should check if this feature is available on your host.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.