Redirect question
6 posts
• Page 1 of 1
Redirect question
Hello
Im new to the redirect envirment. What im trying to do is have both the old and the new urls work but i want to redirect any one that comes from the old url to be forwarded to the new url. I think this is a 301 redirect. No mater what i do it never works.
old url https://url.com/test/prod/mycode.se.wor ... 1GXMfldUqQ
new url https://url.com/kit
I also what to remove everything after the number so no "#.U1GXMfldUqQ" on new url ( i think this is a java session number)
can someone help me with this.
thanks Mike
Im new to the redirect envirment. What im trying to do is have both the old and the new urls work but i want to redirect any one that comes from the old url to be forwarded to the new url. I think this is a 301 redirect. No mater what i do it never works.
old url https://url.com/test/prod/mycode.se.wor ... 1GXMfldUqQ
new url https://url.com/kit
I also what to remove everything after the number so no "#.U1GXMfldUqQ" on new url ( i think this is a java session number)
can someone help me with this.
thanks Mike
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Redirect question
Hello,
Try using the following:
RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} ^TRGT=85&/nxt/rcrs/=2580$ [NC]
RewruteRule ^test/prod/mycode\.se\.work$ https://url.com/kit [NC,R=301,L]
Regarding the '#'. It's a browser executed thing. ISAPI_Rewrite, in contrast, is server-side rules. We simply can't manipulate those.
Regards
Try using the following:
RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} ^TRGT=85&/nxt/rcrs/=2580$ [NC]
RewruteRule ^test/prod/mycode\.se\.work$ https://url.com/kit [NC,R=301,L]
Regarding the '#'. It's a browser executed thing. ISAPI_Rewrite, in contrast, is server-side rules. We simply can't manipulate those.
Regards
Re: Redirect question
How do i make it so that people who bookmarked the old url will automaticly redirected to new url?
for example
RewriteRule ^testmeasureup1 /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21331
RewriteRule ^testmeasureup /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21330
making /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21331 goto this testmeasureup1
thanks Mike
for example
RewriteRule ^testmeasureup1 /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21331
RewriteRule ^testmeasureup /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21330
making /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21331 goto this testmeasureup1
thanks Mike
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Redirect question
Almost the same way you've seen the previous rules:
- Code: Select all
RewriteCond %{QUERY_STRING} ^/nxt/rcrs/proieidentity/\=21331$ [NC]
RewruteRule ^market-t2/t2-prod/productView\.se\.work$ /testmeasureup1 [NC,R=301,L]
Re: Redirect question
so if i had 100 redirect different redirects like the one above. I would have to create 100 of they rewrites you provided?
for example if i had 100 differct one of these statements would i need to make 100 more of your above statements.
RewriteRule ^testmeasureup1 /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21331
RewriteRule ^testmeasureup /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21330
RewriteRule ^classroom-training/testmeasureup /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21330&/nxt/rcrs/aisidentity/=2528
RewriteRule ^qa-test-course-1 /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21329
RewriteRule ^classroom-training/qa-test-course-1 /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21329&/nxt/rcrs/aisidentity/=2528
RewriteRule ^testiltsync /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21328
RewriteRule ^classroom-training/testiltsync /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21328&/nxt/rcrs/aisidentity/=2528
RewriteRule ^test-subscription-renewal /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21327
RewriteRule ^on-demand-e-learning/test-subscription-renewal /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21327&/nxt/rcrs/aisidentity/=2522
RewriteRule ^qatestingpkgtcv-cycle /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21326
RewriteRule ^on-demand-e-learning/qatestingpkgtcv-cycle /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21326&/nxt/rcrs/aisidentity/=2522
RewriteRule ^qatest-vendor-offering /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21325
RewriteRule ^cisco-360-ccie-voice/qatest-vendor-offering /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21325&/nxt/rcrs/aisidentity/=2531
RewriteRule ^qa-migration-update-ilt /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21324
RewriteRule ^classroom-training/qa-migration-update-ilt /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21324&/nxt/rcrs/aisidentity/=2528
RewriteRule ^qa-package-test1 /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21323
for example if i had 100 differct one of these statements would i need to make 100 more of your above statements.
RewriteRule ^testmeasureup1 /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21331
RewriteRule ^testmeasureup /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21330
RewriteRule ^classroom-training/testmeasureup /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21330&/nxt/rcrs/aisidentity/=2528
RewriteRule ^qa-test-course-1 /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21329
RewriteRule ^classroom-training/qa-test-course-1 /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21329&/nxt/rcrs/aisidentity/=2528
RewriteRule ^testiltsync /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21328
RewriteRule ^classroom-training/testiltsync /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21328&/nxt/rcrs/aisidentity/=2528
RewriteRule ^test-subscription-renewal /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21327
RewriteRule ^on-demand-e-learning/test-subscription-renewal /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21327&/nxt/rcrs/aisidentity/=2522
RewriteRule ^qatestingpkgtcv-cycle /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21326
RewriteRule ^on-demand-e-learning/qatestingpkgtcv-cycle /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21326&/nxt/rcrs/aisidentity/=2522
RewriteRule ^qatest-vendor-offering /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21325
RewriteRule ^cisco-360-ccie-voice/qatest-vendor-offering /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21325&/nxt/rcrs/aisidentity/=2531
RewriteRule ^qa-migration-update-ilt /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21324
RewriteRule ^classroom-training/qa-migration-update-ilt /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21324&/nxt/rcrs/aisidentity/=2528
RewriteRule ^qa-package-test1 /market-t2/t2-prod/productView.se.work?/nxt/rcrs/proieidentity/=21323
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Redirect question
Well, I didn't see any pattern. And, if there isn't any, than yes you'd need whatever number of redirect you want.
However, a) hundreds of redirects is NOTHING in terms of performance and b) there's also a trick called MAPFILES - http://www.helicontech.com/forum/10648-FAQ.html under "Comprehensive mapfioles insight"
Regards
However, a) hundreds of redirects is NOTHING in terms of performance and b) there's also a trick called MAPFILES - http://www.helicontech.com/forum/10648-FAQ.html under "Comprehensive mapfioles insight"
Regards
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 14 guests