sshutdownow / mod-myvhost

Automatically exported from code.google.com/p/mod-myvhost
Apache License 2.0
5 stars 5 forks source link

FEATURE REQUEST - Custom rewrite rules for each vhost #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm looking for a way to utilise this module to also provide custom rewrite
rules for each vhost, in a similar way that the custom php config for each
host works.

What would be ideal would be to just use the existing mod_rewrite rule
formatting in a text field.

Example:
RewriteCond %{HTTP_HOST} site1.com$ [NC]
RewriteRule ^(.*) http://newsite.site2.com/ [R,L]
...could become...
'RewriteCond %{HTTP_HOST} site1.com$ [NC]', 'RewriteRule ^(.*)
http://newsite.site2.com/ [R,L]'

Is this at all feasable and/or possible?

Original issue reported on code.google.com by afor...@planetreal.com on 4 Mar 2010 at 10:50

GoogleCodeExporter commented 9 years ago
Do you need redirection from one site to another? It is possible, but
full support for mod_rewrite is to complicated.

Original comment by iPop...@gmail.com on 9 Mar 2010 at 7:30

GoogleCodeExporter commented 9 years ago
To begin, rewriting from one site to another is probably my first challange; it 
would
account for 80% of my redirect cases.

I am pretty sure that I would probably need multiple rewrite rules for each 
virtual
host (eg. add 'www' to the front of many urls, plus also write based on url or 
query
string)

That being said, full mod_rewrite support would be awesome, but as you said,
complicated :)

Would there be a way to just 'inject' a block of apache config in for each host?

Original comment by afor...@planetreal.com on 11 Mar 2010 at 4:39

GoogleCodeExporter commented 9 years ago
To change settings for mod_rewrite on fly is complicated task, it is simpler to
modify mod_rewrite to retrieve data from DB or incorporate mod_rewrite in my 
module.
I'll try to add simple rewrite/redirect support similar to mod_rewrite as
expiremental feature.

"Injection" block of apache config on fly is possible (htaccess works), but to 
do all
work in third party module without changes in apache's sources is a very 
complicated
task and performance of such solution will be very poor.

Original comment by iPop...@gmail.com on 12 Mar 2010 at 9:00

GoogleCodeExporter commented 9 years ago

Original comment by iPop...@gmail.com on 21 Mar 2012 at 6:05