| Author |
|
natureboy Newbie

Joined: 29 June 2011
Online Status: Offline Posts: 12
|
| Posted: 14 July 2011 at 10:10am | IP Logged
|
|
|
Hello,
I am having trouble rewriting the following dynamic url:
http://test.com/74-group_name.html?PageIndex=9&forumoptions=::11::&ThreadSortBy=LastPost&SortOrder=Ascending
to:
http://test.com/forums/74-group_name.html?PageIndex=9&forumoptions=::11::&ThreadSortBy=LastPost&SortOrder=Ascending
Thanks
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 14 July 2011 at 10:31am | IP Logged
|
|
|
Hello.
Please share your configuration code. I’ll try to guide you.
You may also purchase premium support which includes configuration code design: http://www.helicontech.com/order/#support
Thank you.
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
natureboy Newbie

Joined: 29 June 2011
Online Status: Offline Posts: 12
|
| Posted: 14 July 2011 at 10:56am | IP Logged
|
|
|
Configuration code?
I just want to rewrite the above url.
http://test.com/74-group_name.html?PageIndex=9&forumoptions=::11::&ThreadSortBy=LastPost&SortOrder=Ascending
to:
http://test.com/forums/74-group_name.html?PageIndex=9&forumoptions=::11::&ThreadSortBy=LastPost&SortOrder=Ascending
I want if any url has the query string ?pageindex=9&foumoptions=::11 to put the tag forums before the group name.
Thanks
|
| Back to Top |
|
| |
natureboy Newbie

Joined: 29 June 2011
Online Status: Offline Posts: 12
|
| Posted: 14 July 2011 at 11:40am | IP Logged
|
|
|
This is what I wrote and tried but didnt work:
RewriteCond %{QUERY_STRING} ^pageindex=$&forumoptions=::$ SeoRule $1/$2-${slug:${SeoForum:$2}}.html$3 $1/forums/$2-${slug:${SeoForum:$2}}.html$3 [Redirect,Scope=A] RewriteRule 1/forums/$2-${slug:${SeoForum:$2}}.html$3 http\://test.com/$2-${slug:${SeoForum:$2}}.html$3 [NC,QSA]
|
| Back to Top |
|
| |
natureboy Newbie

Joined: 29 June 2011
Online Status: Offline Posts: 12
|
| Posted: 15 July 2011 at 11:11am | IP Logged
|
|
|
Hello,
I know how to write them individually. However the data comes from the db.
Is there one rule that will fix all of them?
RewriteCond %{QUERY_STRING} ^PageIndex=(.*)$ RewriteRule ^81-group-name.html$ http://test.com/forums/81-group-name.html? [NC,R=301,L]
Someone, please help me with this. 
Thanks
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 15 July 2011 at 1:06pm | IP Logged
|
|
|
Hello.
Please try the following example:
Code:
RewriteCond %{QUERY_STRING} pageindex=9&foumoptions=::11 [NC]
RewriteRule (.*) /forums/$1 [R=301,L] |
|
|
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
natureboy Newbie

Joined: 29 June 2011
Online Status: Offline Posts: 12
|
| Posted: 15 July 2011 at 1:24pm | IP Logged
|
|
|
Hello,
I tried the rule and i get this error:
http://test.com/forums/forums/forums/forums/forums/forums/forums/forums/forums/forums/forums/forums/forums/forums/forums/forums/forums/forums/forums/forums/63-group-name.html?showforum=9&ThreadSortBy=Subject&SortOrder=Ascending&PageIndex=1&forumoptions=::11::
The page isn't redirecting properly
Why does it put that many forums in it?
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 18 July 2011 at 8:19am | IP Logged
|
|
|
Hello.
Please try this one:
Code:
RewriteCond %{QUERY_STRING} pageindex=9&foumoptions=::11 [NC]
RewriteCond %{REQUEST_URI} !^/forums.*$ [NC]
RewriteRule (.*) /forums/$1 [R=301,L] |
|
|
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
natureboy Newbie

Joined: 29 June 2011
Online Status: Offline Posts: 12
|
| Posted: 19 July 2011 at 1:28pm | IP Logged
|
|
|
This works well, however it wrecks another section, where it has that query. Is there a way to exclude this url:
http://test.com/f/topicsnotread.aspx?PageIndex=1&forumoptions=::11
Thanks for all the help.
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 19 July 2011 at 1:32pm | IP Logged
|
|
|
Hi,
Try to add the following condition:
Code:
| RewriteCond %{REQUEST_URI} !^/f/.*$ [NC] |
|
|
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
natureboy Newbie

Joined: 29 June 2011
Online Status: Offline Posts: 12
|
| Posted: 19 July 2011 at 2:13pm | IP Logged
|
|
|
You are awesome man. I will purchase the full version.
|
| Back to Top |
|
| |
sbglobal Newbie

Joined: 15 July 2011
Online Status: Offline Posts: 5
|
| Posted: 22 July 2011 at 9:36pm | IP Logged
|
|
|
we want to rewrite url from
http://rajdhaniflorist.com/productsDetail.asp?
productCode=1539
intohttp://rajdhaniflorist.com/Designer-Flowers-
Arrangement.html
|
| Back to Top |
|
| |
natureboy Newbie

Joined: 29 June 2011
Online Status: Offline Posts: 12
|
| Posted: 28 July 2011 at 12:11pm | IP Logged
|
|
|
Hello,
Now my ajax postback requests are not working.
Commands like this: javascript:__doPostBack('ctl00$ctl00$content$content$ctl00$w_2435$_3fb51d5$ctl00$ctl00$ctl00$ConditionalContent2$ctl07$SetCookieValueForm4$ctl04$UnAnsweredOnly','')
Are not working. I use lots of ajax on my site, so I can't go in there and edit every request.
Is there a rule I can use to block Ajax postbacks from firing?
This is my rule:
SeoRule ^?(.*)/f/(\d+)\.aspx(.*)$ $1/forums/$2-${slug:${SeoForum:$2}}.html$3 [Redirect,Scope=A] RewriteRule ^?(.*)/(\d+)-(.*)\.html(.*)$ http\://test.com/f/$2.aspx$4 [NC,QSA]
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 29 July 2011 at 7:03am | IP Logged
|
|
|
Hello.
Please provide examples of non-working requests. The javascript sample code doesn’t provide such information.
Thank you.
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
natureboy Newbie

Joined: 29 June 2011
Online Status: Offline Posts: 12
|
| Posted: 02 August 2011 at 1:27pm | IP Logged
|
|
|
Hello,
I having similar issues to this post:
http://www.helicontech.com/forum/12930-problem_with_ajax.html
Very similar to this example:
<a href="javascript:__doPostBack('rptFriendNotes$ctl00$butComment','')" id="rptFriendNotes_ctl00_butComment">Leave a comment</a>
How can I make the above rule work with ajax? There are lots of requests, so I can't go in there and make it work by changing the code.
Thanks
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 03 August 2011 at 8:32am | IP Logged
|
|
|
Hello.
The solution is to exclude post-back request from the rules.
Please find out what request goes to the server when you click on “Leave a comment” link.
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |
natureboy Newbie

Joined: 29 June 2011
Online Status: Offline Posts: 12
|
| Posted: 10 August 2011 at 10:02am | IP Logged
|
|
|
Hello,
This is the request that gets sent:
<input id="ctl00_ctl00_content_content_ctl00_w_3051_ctl01_ctl00_forumSubscriptions_ctl02_ctl03_ctl18_ctl09" type="hidden" value="0" name="ctl00$ctl00$content$content$ctl00$w_3051$ctl01$ctl00$forumSubscriptions$ctl02$ctl03$ctl18$ctl09">
So how do I exclude this?
Thanks
|
| Back to Top |
|
| |
Vyacheslav Admin Group

Joined: 02 July 2008 Location: Ukraine
Online Status: Offline Posts: 1542
|
| Posted: 13 August 2011 at 5:32pm | IP Logged
|
|
|
Hello.
That’s HTML code. When you click on the link, an HTTP request is sent to the server. The goal is to exclude this request. For example, if the click fires /foo/bar.aspx request, then you should exclude it as follows:
Code:
RewriteCond %{REQUEST_URI} !/foo/bar\.aspx [NC]
# RewriteRule goes here |
|
|
Additionally please try the following general rule:
Code:
| RewriteRule ^(.+\.axd.*)$ - [NC,L] |
|
|
It must be put above other rules.
__________________ Slavik Shynkarenko,
Helicon Tech.
|
| Back to Top |
|
| |