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;
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
|
show 1 more comment
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
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 theSetOutputFilter
and theSubstitute
directive are explicitly documented as available in dynamic configuration files (".htaccess").
– arkascha
Mar 24 at 14:18
|
show 1 more comment
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
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
apache .htaccess mod-rewrite proxy reverse-proxy
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 theSetOutputFilter
and theSubstitute
directive are explicitly documented as available in dynamic configuration files (".htaccess").
– arkascha
Mar 24 at 14:18
|
show 1 more comment
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 theSetOutputFilter
and theSubstitute
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
|
show 1 more comment
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 theSubstitute
directive are explicitly documented as available in dynamic configuration files (".htaccess").– arkascha
Mar 24 at 14:18