Need Help to write rules....
18 posts
• Page 1 of 1
Need Help to write rules....
Hi,
I have to write some rules to redirect users from some URLs to other URL. Please refer below example --
Source Url: http://at.1234.com/Documents/1234%20Test%20for%20Consumer%20Packing%20Goods%20sales%20deck%202007%20version.pptx
Redirect URL: https://at.1234.com/KandA/TestLibrary/Ind%20Exp%20Utility
Please provide the redirection conditions and rules
Thanks & Regards,
Galisetti
I have to write some rules to redirect users from some URLs to other URL. Please refer below example --
Source Url: http://at.1234.com/Documents/1234%20Test%20for%20Consumer%20Packing%20Goods%20sales%20deck%202007%20version.pptx
Redirect URL: https://at.1234.com/KandA/TestLibrary/Ind%20Exp%20Utility
Please provide the redirection conditions and rules
Thanks & Regards,
Galisetti
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Need Help to write rules....
Hello,
Please, try using
Regards
Andrew
Please, try using
- Code: Select all
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP:Host} ^at\.1234\.com$ [NC]
RewriteRule ^Documents/1234\%20Test\%20for\%20Consume\r%20Packing\%20Goods\%20sales\%20deck\%202007\%20version.pptx$ /KandA/TestLibrary/Ind%20Exp%20Utility [NC,R=301,L]
Regards
Andrew
Re: Need Help to write rules....
Hi Andrew,
After entering Source Url: http://at.1234.com/Documents/1234%20Test%20for%20Consumer%20Packing%20Goods%20sales%20deck%202007%20version.pptx
browser window is closed, and download popup window is opened. Its not redirect to https://at.1234.com/KandA/TestLibrary/Ind%20Exp%20Utility.
Please provide the solution
Thanks & Regards,
Galisetti
After entering Source Url: http://at.1234.com/Documents/1234%20Test%20for%20Consumer%20Packing%20Goods%20sales%20deck%202007%20version.pptx
browser window is closed, and download popup window is opened. Its not redirect to https://at.1234.com/KandA/TestLibrary/Ind%20Exp%20Utility.
Please provide the solution
Thanks & Regards,
Galisetti
Last edited by Galisetti on 01 Jul 2013, 10:20, edited 1 time in total.
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Need Help to write rules....
Is it opening the right file in this download window?
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Need Help to write rules....
In this case ISAPI_Rewrite did everything it was supposed to do. It just redirected, the fact that the download windows gets opened means there are some IIS settings that need to be changed. I think it's something about MIME type.
Regards
Andrew
Regards
Andrew
Re: Need Help to write rules....
Hi Andrew,
can you provide the steps to check MIME Type settings in IIS which you have mention in the post.
Thanks & Regards,
Galisetti
can you provide the steps to check MIME Type settings in IIS which you have mention in the post.
Thanks & Regards,
Galisetti
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Need Help to write rules....
Hello,
I re-read the whole topic and take my words back about the MIME type. Lets simply take a look at the rewrite.log and see how the request is processed. Logging issues are described in FAQ - http://www.helicontech.com/forum/10648-FAQ.html
Regards
Andrew
I re-read the whole topic and take my words back about the MIME type. Lets simply take a look at the rewrite.log and see how the request is processed. Logging issues are described in FAQ - http://www.helicontech.com/forum/10648-FAQ.html
Regards
Andrew
Re: Need Help to write rules....
hello,
Need help to write a rule for as below.
http://mazda.com.my/mailman/admindb/all ... zda.com.my
to
http://herod.dnsvine.com/mailman/admind ... zda.com.my
Need help to write a rule for as below.
http://mazda.com.my/mailman/admindb/all ... zda.com.my
to
http://herod.dnsvine.com/mailman/admind ... zda.com.my
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Need Help to write rules....
Hello,
Please, try:
Or do you rather want more universal rule?
Regards
Andrew
Please, try:
- Code: Select all
RewriteCond %{HTTP:Host} ^mazda\.com\.my$ [NC]
RewriteRule ^mailman/admindb/allmazda_mazda\.com\.my$ http://herod.dnsvine.com/mailman/admindb/allmazda_mazda.com.my [NC,R=301,L]
Or do you rather want more universal rule?
Regards
Andrew
Re: Need Help to write rules....
Thank You Andrew for your help.
I have put the rule to ISAPI_rewrite config file. But as you see its doesn't work.
Did i put the rule in wrong place? Where should i put the rule?
I have put the rule to ISAPI_rewrite config file. But as you see its doesn't work.
Did i put the rule in wrong place? Where should i put the rule?
Re: Need Help to write rules....
Thanks Andrew for your awesome help.
I want only this specific url to be redirected.
I want only this specific url to be redirected.
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Need Help to write rules....
1) In this case make sure ISAPI_Rewrite is working at all by following FAQ - http://www.helicontech.com/forum/10648-FAQ.html
2) You also need to have these lines on top of your config:
3) The rule should be in .htaccess or httpd.conf.
Regards
Andrew
2) You also need to have these lines on top of your config:
RewriteEngine on
RewriteBase /
3) The rule should be in .htaccess or httpd.conf.
Regards
Andrew
Re: Need Help to write rules....
Hi,
my rule is:
RewriteCond %{HTTP:Host} ^at\.1234\.com$ [NC]
RewriteRule ^try/1234/ABC\ Library/Credentials\ and\ Experience/1234\ Experience\ Industrial\ abc\.pptx$ /capital/GLibrary/15af43f7\%2D1625\%2D4381\%2D885c\%2D55299c087bae [NC,R=301,L,NE]
i am missing "?" in end of line my i know what is the impact of "?".
RewriteCond %{HTTP:Host} ^at\.1234\.com$ [NC]
RewriteRule ^try/1234/ABC\ Library/Credentials\ and\ Experience/1234\ Experience\ Industrial\ abc\.pptx$ /capital/GLibrary/15af43f7\%2D1625\%2D4381\%2D885c\%2D55299c087bae? [NC,R=301,L,NE]
Regards,
Ramesh
my rule is:
RewriteCond %{HTTP:Host} ^at\.1234\.com$ [NC]
RewriteRule ^try/1234/ABC\ Library/Credentials\ and\ Experience/1234\ Experience\ Industrial\ abc\.pptx$ /capital/GLibrary/15af43f7\%2D1625\%2D4381\%2D885c\%2D55299c087bae [NC,R=301,L,NE]
i am missing "?" in end of line my i know what is the impact of "?".
RewriteCond %{HTTP:Host} ^at\.1234\.com$ [NC]
RewriteRule ^try/1234/ABC\ Library/Credentials\ and\ Experience/1234\ Experience\ Industrial\ abc\.pptx$ /capital/GLibrary/15af43f7\%2D1625\%2D4381\%2D885c\%2D55299c087bae? [NC,R=301,L,NE]
Regards,
Ramesh
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Need Help to write rules....
Hello,
The '?' at the end of the rule prevents appending the querystring from original request.
Regards
Andrew
The '?' at the end of the rule prevents appending the querystring from original request.
Regards
Andrew
Re: Need Help to write rules....
Hi,
In our production server already having 2000 query string rules, i am appending 23 rules below type
Source Url: https://at.1234.com/try/1234/ABC Library/Credentials and Experience/1234 Experience Industrial abc.pptx
Redirect Url: https://at.1234.com/capital/GLibrary/15 ... 299c087bae
Rule is -
RewriteCond %{HTTP:Host} ^at\.1234\.com$ [NC]
RewriteRule ^try/1234/ABC\ Library/Credentials\ and\ Experience/1234\ Experience\ Industrial\ abc\.pptx$ /capital/GLibrary/15af43f7\%2D1625\%2D4381\%2D885c\%2D55299c087bae [NC,R=301,L,NE]
then after i am getting web page cannot find(it looked like the user was getting redirected over and over in an infinite loop).
Missing '?' is the reason i am getting below error
web page cannot find(it looked like the user was getting redirected over and over in an infinite loop)
any help you could give would be appricated.
Thanks & Regards,
Galisetti
In our production server already having 2000 query string rules, i am appending 23 rules below type
Source Url: https://at.1234.com/try/1234/ABC Library/Credentials and Experience/1234 Experience Industrial abc.pptx
Redirect Url: https://at.1234.com/capital/GLibrary/15 ... 299c087bae
Rule is -
RewriteCond %{HTTP:Host} ^at\.1234\.com$ [NC]
RewriteRule ^try/1234/ABC\ Library/Credentials\ and\ Experience/1234\ Experience\ Industrial\ abc\.pptx$ /capital/GLibrary/15af43f7\%2D1625\%2D4381\%2D885c\%2D55299c087bae [NC,R=301,L,NE]
then after i am getting web page cannot find(it looked like the user was getting redirected over and over in an infinite loop).
Missing '?' is the reason i am getting below error
web page cannot find(it looked like the user was getting redirected over and over in an infinite loop)
any help you could give would be appricated.
Thanks & Regards,
Galisetti
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Need Help to write rules....
The rule is okay. It's hard to say why it is happening without seeing the whole picture(other rules) and the logs. Logging issues are described in FAQ - http://www.helicontech.com/forum/10648-FAQ.html
Rewrite.log shows the processing of the request.
Regards
Andrew
Rewrite.log shows the processing of the request.
Regards
Andrew
18 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 9 guests