DevHeads.net

Re: [users@httpd] How can I simplify this URL to just the hostname with rewrite rules?

Have you tried “Redirect permanent “/q3/app\?service=external/EmployerPages:DudeLogin” “https://test.thing.seabass.com”

Darryl Baker (he/him/his)
Sr. System Administrator
Distributed Application Platform Services
Northwestern University
1800 Sherman Ave.
Suite 6-600 – Box #39
Evanston, IL 60201-3715
darryl. ... at northwestern dot edu<mailto:darryl. ... at northwestern dot edu>
(847) 467-6674

Reply-To: " ... at httpd dot apache.org" < ... at httpd dot apache.org>

So – I’m the administrator of a Java application which has a URL similar to the following:

https://test.thing.seabass.com/q3/app?service=external/EmployerPages:DudeLogin<https://urldefense.proofpoint.com/v2/url?u=https-3A__test.thing.seabass.com_q3_app-3Fservice-3Dexternal_EmployerPages-3ADudeLogin&d=DwMFAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=tdje61_VHSXp608oLofeaJnnzo2Sr9_Cdcp70bBEtQ8&m=8Aa0zSVZtRpfqY8GcJh8QpGhRovF06tJz2sdyg3qDBA&s=E90MAqULoeK9c3dlUcLIvkoON2H1WDhEuLZJCAi_af4&e=>

Can’t have them change it, and there’s no way to simplify.

I’d like to redirect the URL above to:

https://test.thing.seabass.com<https://urldefense.proofpoint.com/v2/url?u=https-3A__test.thing.seabass.com&d=DwMFAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=tdje61_VHSXp608oLofeaJnnzo2Sr9_Cdcp70bBEtQ8&m=8Aa0zSVZtRpfqY8GcJh8QpGhRovF06tJz2sdyg3qDBA&s=YE0EfcL6c9RzsWFOiHk_bnk_8UAj7Eq_M1R12hE7d-o&e=>

I’ve tried a few rewrite rules by trial and error, unsuccessfully.

I also attempted to use generators such as http://www.visiospark.com/mod-rewrite-rule-generator/<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.visiospark.com_mod-2Drewrite-2Drule-2Dgenerator_&d=DwMFAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=tdje61_VHSXp608oLofeaJnnzo2Sr9_Cdcp70bBEtQ8&m=8Aa0zSVZtRpfqY8GcJh8QpGhRovF06tJz2sdyg3qDBA&s=ht6zFOeSwSKLAEhCogBxpjT2_o7CxT-Kfkgk-1NXPdM&e=> and https://www.generateit.net/mod-rewrite/index.php<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.generateit.net_mod-2Drewrite_index.php&d=DwMFAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=tdje61_VHSXp608oLofeaJnnzo2Sr9_Cdcp70bBEtQ8&m=8Aa0zSVZtRpfqY8GcJh8QpGhRovF06tJz2sdyg3qDBA&s=ol9qMynnkaqgD5sQk2NQ-S_GDT1g3eM9yQvTXcNMMUo&e=>.

Any thoughts?

Thanks in advance.

Comments

Re: How can I simplify this URL to just the hostna

By Darryl Philip Baker at 08/13/2019 - 15:09

The string I supplied has a stray double quote before the keyword Redirect, sorry.

Darryl Baker (he/him/his)
Sr. System Administrator
Distributed Application Platform Services
Northwestern University
1800 Sherman Ave.
Suite 6-600 – Box #39
Evanston, IL 60201-3715
darryl. ... at northwestern dot edu<mailto:darryl. ... at northwestern dot edu>
(847) 467-6674

Reply-To: " ... at httpd dot apache.org" < ... at httpd dot apache.org>

Have you tried “Redirect permanent “/q3/app\?service=external/EmployerPages:DudeLogin” “https://test.thing.seabass.com”

Darryl Baker (he/him/his)
Sr. System Administrator
Distributed Application Platform Services
Northwestern University
1800 Sherman Ave.
Suite 6-600 – Box #39
Evanston, IL 60201-3715
darryl. ... at northwestern dot edu<mailto:darryl. ... at northwestern dot edu>
(847) 467-6674

Reply-To: " ... at httpd dot apache.org" < ... at httpd dot apache.org>

So – I’m the administrator of a Java application which has a URL similar to the following:

https://test.thing.seabass.com/q3/app?service=external/EmployerPages:DudeLogin<https://urldefense.proofpoint.com/v2/url?u=https-3A__test.thing.seabass.com_q3_app-3Fservice-3Dexternal_EmployerPages-3ADudeLogin&d=DwMFAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=tdje61_VHSXp608oLofeaJnnzo2Sr9_Cdcp70bBEtQ8&m=8Aa0zSVZtRpfqY8GcJh8QpGhRovF06tJz2sdyg3qDBA&s=E90MAqULoeK9c3dlUcLIvkoON2H1WDhEuLZJCAi_af4&e=>

Can’t have them change it, and there’s no way to simplify.

I’d like to redirect the URL above to:

https://test.thing.seabass.com<https://urldefense.proofpoint.com/v2/url?u=https-3A__test.thing.seabass.com&d=DwMFAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=tdje61_VHSXp608oLofeaJnnzo2Sr9_Cdcp70bBEtQ8&m=8Aa0zSVZtRpfqY8GcJh8QpGhRovF06tJz2sdyg3qDBA&s=YE0EfcL6c9RzsWFOiHk_bnk_8UAj7Eq_M1R12hE7d-o&e=>

I’ve tried a few rewrite rules by trial and error, unsuccessfully.

I also attempted to use generators such as http://www.visiospark.com/mod-rewrite-rule-generator/<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.visiospark.com_mod-2Drewrite-2Drule-2Dgenerator_&d=DwMFAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=tdje61_VHSXp608oLofeaJnnzo2Sr9_Cdcp70bBEtQ8&m=8Aa0zSVZtRpfqY8GcJh8QpGhRovF06tJz2sdyg3qDBA&s=ht6zFOeSwSKLAEhCogBxpjT2_o7CxT-Kfkgk-1NXPdM&e=> and https://www.generateit.net/mod-rewrite/index.php<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.generateit.net_mod-2Drewrite_index.php&d=DwMFAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=tdje61_VHSXp608oLofeaJnnzo2Sr9_Cdcp70bBEtQ8&m=8Aa0zSVZtRpfqY8GcJh8QpGhRovF06tJz2sdyg3qDBA&s=ol9qMynnkaqgD5sQk2NQ-S_GDT1g3eM9yQvTXcNMMUo&e=>.

Any thoughts?

Thanks in advance.

RE: How can I simplify this URL to just the hostna

By Dorrian, William at 08/13/2019 - 15:52

Darryl,

Thanks for your answer. Let me give that a try.

The string I supplied has a stray double quote before the keyword Redirect, sorry.

Darryl Baker (he/him/his)
Sr. System Administrator
Distributed Application Platform Services
Northwestern University
1800 Sherman Ave.
Suite 6-600 – Box #39
Evanston, IL 60201-3715
darryl. ... at northwestern dot edu<mailto:darryl. ... at northwestern dot edu>
(847) 467-6674

Reply-To: " ... at httpd dot apache.org<mailto: ... at httpd dot apache.org>" < ... at httpd dot apache.org<mailto: ... at httpd dot apache.org>>

Have you tried “Redirect permanent “/q3/app\?service=external/EmployerPages:DudeLogin” “https://test.thing.seabass.com<https://urldefense.proofpoint.com/v2/url?u=https-3A__test.thing.seabass.com&d=DwQGaQ&c=gtIjdLs6LnStUpy9cTOW9w&r=T47OVmVp_3gm3njCU36TeWTS5W9ZoAxPnQ-zGHLl0rs&m=2OmUz6HafSUtEz0EEeO4tK_DoyzlEBq-h2pjFWnEyxM&s=XvMwBz1tTA3kKXaFYYhF0yfe3JuGEzX3-90UAgbEVB0&e=>”

Darryl Baker (he/him/his)
Sr. System Administrator
Distributed Application Platform Services
Northwestern University
1800 Sherman Ave.
Suite 6-600 – Box #39
Evanston, IL 60201-3715
darryl. ... at northwestern dot edu<mailto:darryl. ... at northwestern dot edu>
(847) 467-6674

Reply-To: " ... at httpd dot apache.org<mailto: ... at httpd dot apache.org>" < ... at httpd dot apache.org<mailto: ... at httpd dot apache.org>>

So – I’m the administrator of a Java application which has a URL similar to the following:

https://test.thing.seabass.com/q3/app?service=external/EmployerPages:DudeLogin<https://urldefense.proofpoint.com/v2/url?u=https-3A__test.thing.seabass.com_q3_app-3Fservice-3Dexternal_EmployerPages-3ADudeLogin&d=DwMFAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=tdje61_VHSXp608oLofeaJnnzo2Sr9_Cdcp70bBEtQ8&m=8Aa0zSVZtRpfqY8GcJh8QpGhRovF06tJz2sdyg3qDBA&s=E90MAqULoeK9c3dlUcLIvkoON2H1WDhEuLZJCAi_af4&e=>

Can’t have them change it, and there’s no way to simplify.

I’d like to redirect the URL above to:

https://test.thing.seabass.com<https://urldefense.proofpoint.com/v2/url?u=https-3A__test.thing.seabass.com&d=DwMFAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=tdje61_VHSXp608oLofeaJnnzo2Sr9_Cdcp70bBEtQ8&m=8Aa0zSVZtRpfqY8GcJh8QpGhRovF06tJz2sdyg3qDBA&s=YE0EfcL6c9RzsWFOiHk_bnk_8UAj7Eq_M1R12hE7d-o&e=>

I’ve tried a few rewrite rules by trial and error, unsuccessfully.

I also attempted to use generators such as http://www.visiospark.com/mod-rewrite-rule-generator/<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.visiospark.com_mod-2Drewrite-2Drule-2Dgenerator_&d=DwMFAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=tdje61_VHSXp608oLofeaJnnzo2Sr9_Cdcp70bBEtQ8&m=8Aa0zSVZtRpfqY8GcJh8QpGhRovF06tJz2sdyg3qDBA&s=ht6zFOeSwSKLAEhCogBxpjT2_o7CxT-Kfkgk-1NXPdM&e=> and https://www.generateit.net/mod-rewrite/index.php<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.generateit.net_mod-2Drewrite_index.php&d=DwMFAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=tdje61_VHSXp608oLofeaJnnzo2Sr9_Cdcp70bBEtQ8&m=8Aa0zSVZtRpfqY8GcJh8QpGhRovF06tJz2sdyg3qDBA&s=ol9qMynnkaqgD5sQk2NQ-S_GDT1g3eM9yQvTXcNMMUo&e=>.

Any thoughts?

Thanks in advance.