Apache: mod_rewrite & mod_substitute in .htaccessHow to enable mod_rewrite for Apache 2.2using .htaccess to serve index.html or index.phprewrite main domain to a sub-directory with .htaccesshtaccess rewrite to include #!Tips for debugging .htaccess rewrite ruleshow to change htaccess to access symfony web directoryhtaccess rewrite rules for multiple domains (symfony 2 in subfolders).htaccess how convert this URL in friendly?Url rewriting for Yii2 Restful apiMultiple languages + Htaccess

90's TV series where a boy goes to another dimension through portal near power lines

Can I use a neutral wire from another outlet to repair a broken neutral?

Is it inappropriate for a student to attend their mentor's dissertation defense?

Did Shadowfax go to Valinor?

Does a druid starting with a bow start with no arrows?

Why do I get two different answers for this counting problem?

What is the word for reserving something for yourself before others do?

Do I have a twin with permutated remainders?

Infinite Abelian subgroup of infinite non Abelian group example

Facing a paradox: Earnshaw's theorem in one dimension

Could gravitational lensing be used to protect a spaceship from a laser?

Is it legal for company to use my work email to pretend I still work there?

How to model explosives?

What does it mean to describe someone as a butt steak?

Brothers & sisters

Is the Joker left-handed?

How to show the equivalence between the regularized regression and their constraint formulas using KKT

Neighboring nodes in the network

I'm flying to France today and my passport expires in less than 2 months

Twin primes whose sum is a cube

Why is Collection not simply treated as Collection<?>

Famous Pre Reformation Christian Pastors (Non Catholic and Non Orthodox)

Watching something be written to a file live with tail

Emailing HOD to enhance faculty application



Apache: mod_rewrite & mod_substitute in .htaccess


How to enable mod_rewrite for Apache 2.2using .htaccess to serve index.html or index.phprewrite main domain to a sub-directory with .htaccesshtaccess rewrite to include #!Tips for debugging .htaccess rewrite ruleshow to change htaccess to access symfony web directoryhtaccess rewrite rules for multiple domains (symfony 2 in subfolders).htaccess how convert this URL in friendly?Url rewriting for Yii2 Restful apiMultiple languages + Htaccess






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















The host which serves the client's web site only provides access to the .htaccess file.



I need a proxy which works fine:



RewriteEngine on
RewriteBase /

RewriteCond %HTTP_HOST ^client.com$
RewriteRule ^special-dir(.*) https://partner.com/$1 [P,L]


Is it possible to integrate mod_substitute with this (only using the .htaccess)? I want to replace certain URLs in the partner's web site.



AddOutputFilterByType SUBSTITUTE text/html
Substitute "s/badurl/goodurl/ni"


The combination of both doesn't seem to work. Any ideas?










share|improve this question
























  • Well, is the substitution module loaded at all into the http server? That is not exactly common...

    – arkascha
    Mar 21 at 22:26











  • Yes, mod_substitute is installed. I can use it to alter local outputs.

    – Railsana
    Mar 21 at 23:07











  • There is an interesting article about something similar: carstens.space/apache-mod-substitute-bei-einem-reverse-proxy It is in german language, but I assume google can help understanding the content. The main point seems to be to take care of the compression of the payload...

    – arkascha
    Mar 22 at 11:43











  • Thank you, unfortunately the example of the article only works in an httpd.conf configuration, not in the .htaccess file. :/

    – Railsana
    Mar 24 at 13:56











  • Why that? Both the SetOutputFilter and the Substitute directive are explicitly documented as available in dynamic configuration files (".htaccess").

    – arkascha
    Mar 24 at 14:18

















0















The host which serves the client's web site only provides access to the .htaccess file.



I need a proxy which works fine:



RewriteEngine on
RewriteBase /

RewriteCond %HTTP_HOST ^client.com$
RewriteRule ^special-dir(.*) https://partner.com/$1 [P,L]


Is it possible to integrate mod_substitute with this (only using the .htaccess)? I want to replace certain URLs in the partner's web site.



AddOutputFilterByType SUBSTITUTE text/html
Substitute "s/badurl/goodurl/ni"


The combination of both doesn't seem to work. Any ideas?










share|improve this question
























  • Well, is the substitution module loaded at all into the http server? That is not exactly common...

    – arkascha
    Mar 21 at 22:26











  • Yes, mod_substitute is installed. I can use it to alter local outputs.

    – Railsana
    Mar 21 at 23:07











  • There is an interesting article about something similar: carstens.space/apache-mod-substitute-bei-einem-reverse-proxy It is in german language, but I assume google can help understanding the content. The main point seems to be to take care of the compression of the payload...

    – arkascha
    Mar 22 at 11:43











  • Thank you, unfortunately the example of the article only works in an httpd.conf configuration, not in the .htaccess file. :/

    – Railsana
    Mar 24 at 13:56











  • Why that? Both the SetOutputFilter and the Substitute directive are explicitly documented as available in dynamic configuration files (".htaccess").

    – arkascha
    Mar 24 at 14:18













0












0








0








The host which serves the client's web site only provides access to the .htaccess file.



I need a proxy which works fine:



RewriteEngine on
RewriteBase /

RewriteCond %HTTP_HOST ^client.com$
RewriteRule ^special-dir(.*) https://partner.com/$1 [P,L]


Is it possible to integrate mod_substitute with this (only using the .htaccess)? I want to replace certain URLs in the partner's web site.



AddOutputFilterByType SUBSTITUTE text/html
Substitute "s/badurl/goodurl/ni"


The combination of both doesn't seem to work. Any ideas?










share|improve this question
















The host which serves the client's web site only provides access to the .htaccess file.



I need a proxy which works fine:



RewriteEngine on
RewriteBase /

RewriteCond %HTTP_HOST ^client.com$
RewriteRule ^special-dir(.*) https://partner.com/$1 [P,L]


Is it possible to integrate mod_substitute with this (only using the .htaccess)? I want to replace certain URLs in the partner's web site.



AddOutputFilterByType SUBSTITUTE text/html
Substitute "s/badurl/goodurl/ni"


The combination of both doesn't seem to work. Any ideas?







apache .htaccess mod-rewrite proxy reverse-proxy






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 22 at 9:10







Railsana

















asked Mar 21 at 21:52









RailsanaRailsana

5991924




5991924












  • Well, is the substitution module loaded at all into the http server? That is not exactly common...

    – arkascha
    Mar 21 at 22:26











  • Yes, mod_substitute is installed. I can use it to alter local outputs.

    – Railsana
    Mar 21 at 23:07











  • There is an interesting article about something similar: carstens.space/apache-mod-substitute-bei-einem-reverse-proxy It is in german language, but I assume google can help understanding the content. The main point seems to be to take care of the compression of the payload...

    – arkascha
    Mar 22 at 11:43











  • Thank you, unfortunately the example of the article only works in an httpd.conf configuration, not in the .htaccess file. :/

    – Railsana
    Mar 24 at 13:56











  • Why that? Both the SetOutputFilter and the Substitute directive are explicitly documented as available in dynamic configuration files (".htaccess").

    – arkascha
    Mar 24 at 14:18

















  • Well, is the substitution module loaded at all into the http server? That is not exactly common...

    – arkascha
    Mar 21 at 22:26











  • Yes, mod_substitute is installed. I can use it to alter local outputs.

    – Railsana
    Mar 21 at 23:07











  • There is an interesting article about something similar: carstens.space/apache-mod-substitute-bei-einem-reverse-proxy It is in german language, but I assume google can help understanding the content. The main point seems to be to take care of the compression of the payload...

    – arkascha
    Mar 22 at 11:43











  • Thank you, unfortunately the example of the article only works in an httpd.conf configuration, not in the .htaccess file. :/

    – Railsana
    Mar 24 at 13:56











  • Why that? Both the SetOutputFilter and the Substitute directive are explicitly documented as available in dynamic configuration files (".htaccess").

    – arkascha
    Mar 24 at 14:18
















Well, is the substitution module loaded at all into the http server? That is not exactly common...

– arkascha
Mar 21 at 22:26





Well, is the substitution module loaded at all into the http server? That is not exactly common...

– arkascha
Mar 21 at 22:26













Yes, mod_substitute is installed. I can use it to alter local outputs.

– Railsana
Mar 21 at 23:07





Yes, mod_substitute is installed. I can use it to alter local outputs.

– Railsana
Mar 21 at 23:07













There is an interesting article about something similar: carstens.space/apache-mod-substitute-bei-einem-reverse-proxy It is in german language, but I assume google can help understanding the content. The main point seems to be to take care of the compression of the payload...

– arkascha
Mar 22 at 11:43





There is an interesting article about something similar: carstens.space/apache-mod-substitute-bei-einem-reverse-proxy It is in german language, but I assume google can help understanding the content. The main point seems to be to take care of the compression of the payload...

– arkascha
Mar 22 at 11:43













Thank you, unfortunately the example of the article only works in an httpd.conf configuration, not in the .htaccess file. :/

– Railsana
Mar 24 at 13:56





Thank you, unfortunately the example of the article only works in an httpd.conf configuration, not in the .htaccess file. :/

– Railsana
Mar 24 at 13:56













Why that? Both the SetOutputFilter and the Substitute directive are explicitly documented as available in dynamic configuration files (".htaccess").

– arkascha
Mar 24 at 14:18





Why that? Both the SetOutputFilter and the Substitute directive are explicitly documented as available in dynamic configuration files (".htaccess").

– arkascha
Mar 24 at 14:18












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55289806%2fapache-mod-rewrite-mod-substitute-in-htaccess%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55289806%2fapache-mod-rewrite-mod-substitute-in-htaccess%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현