开发者

Drupal 7, trying to use Site.php to redirect localhost requests

hi I'm trying to get my multisites config working, and am struggeling at the 1st hurdle I want my sites.php to redirect requests to one of my two test sites folders. I can't seem to understand how to use this array?

as I'm using an Xampp install my requests look like this.

  • http://localhost/sitename

where sitename is my website project and would be locally known as

  • c:\xampp\htdocs\sitename

I want to implement a redirector something like

using the sites.php example (shown here)

  • $sites = array(
  • 'devexample.com' => 'example.com',
  • 'localhost.example' => 'example.com',
  • );

I can't see how I can interpret my address. i.e.

  • http://localhost/sitename/mobile
  • http://localhost/mobile/sitename

into the sites.php files i.e.

  • $sites = array(
  • 'localhost.mobile' => 'mobile',
  • 'localhost' => 'normal',
  • );

thanks.. p.s. This is similar to my other recent question, but is different due to being about sites.php not drupal multifolder layout.


I believe I've found the answer to this, and its to edit the hosts file on my windows installtion to cause a web address to redirect back to 127.0.0.1 to be picked up by the local web server. then drupal site.php can use the new web name to effect its redirect.

I think it was one of those can't see the wood for the trees issues.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜