当サイトの多くのページでは、画像、css、javascriptファイルに古いサブドメインを使用しています。私は初心者の開発者からプロジェクトを継承しましたが、彼らは一般的なデザインテンプレートを使用していませんでした。結果は、コンテンツへの静的参照を含む数百ページになります。例は次のとおりです。
http://static.foo.bar/css/sample.css
http://static.foo.bar/brochure/css/sample.css
http://static.foo.bar/company/newsletter/js/common.js
http://static.foo.bar/images/version2/header.jpg
...そして他の何百もの場所。.htaccessファイルにこれらのそれぞれのルールを作成せずに、サブドメインではなくメインドメインをすべて指すようにする必要があります。それで:
http://static.foo.bar/css/sample.css
should point to:
http://www.foo.bar/css/sample.css
http://static.foo.bar/brochure/css/sample.css
should point to:
http://www.foo.bar/brochure/css/sample.css
http://static.foo.bar/company/newsletter/js/common.js
should point to:
http://www.foo.bar/company/newsletter/js/common.js
http://static.foo.bar/images/version2/header.jpg
should point to:
http://www.foo.bar/images/version2/header.jpg
私はこれが可能であることを知っています。私はサーバーの人ではありません。どんな助けでも大歓迎です。