开发者

redirecting domain to subdirectory with php or apache

开发者 https://www.devze.com 2023-02-15 12:32 出处:网络
<IfModule mod_rewrite.c> RewriteCond %{HTT开发者_如何学PythonP_HOST} ^(www.)?url.com$ RewriteRule ^(/)?$ www-static [L]
<IfModule mod_rewrite.c>
    RewriteCond %{HTT开发者_如何学PythonP_HOST} ^(www.)?url.com$
    RewriteRule ^(/)?$ www-static [L]
</IfModule>

ok the apache config above works well. it does

url.com to url.com/www-static = www.myurl.com/www-static

1. can we do something like in apache ?

url.com = www.myurl.com/www-static without adding the /www-static on the url ?

2. how about in php ? or its better on apache? ( lets say we have thousand of domain redirecting to a spesific folder that we fetch from the database )

Thanks for looking in

Adam Ramadhan


Use a bootstrap and the MVC pattern. This way you can detect the referring URL and fetch the content that you want to show... it's how all of those search engine cloaker scripts work (which it sounds like you are trying to do).

0

精彩评论

暂无评论...
验证码 换一张
取 消