Apache revise regulations for growth workstation and also web server

I've obtained programmers editing and enhancing web pages for numerous websites on a WAMP pile and afterwards posting to the general public web servers running LAMP heaps. We're rather satisfied with it, yet we have this small aggravation : we can not fairly make use of the same.htaccess documents in the growth and also manufacturing settings. On the general public websites, the resource folder maps to http://foo.com, http://bar.com, and more. On the programmer workstation, the resource folders map to http://localhost/foo, http://localhost/bar, and more. That suggests that I require RewriteBase / for the general public web servers, while each website on the programmer workstation makes use of RewriteBase /foo/, RewriteBase /bar/, or whatever.

Exists any kind of means to define the RewriteBase about the .htaccess documents? Any kind of various other suggestions for just how to make my revise regulations extra mobile?

If you're interested, I'm making use of revise regulations to reroute to CakePHP transmitting code, so the regulation resembles this :

RewriteRule ^(.*)$ cake_main.php?url=$1 [QSA,L]

If I do not make use of a RewriteBase of /foo/ on the programmer workstation, after that it will certainly revise to /cake_main.php as opposed to /foo/cake_main.php.

2019-05-07 14:12:55
Source Share
Answers: 1

My remedy to this hasn't been to tinker the revise regulations, yet to add different neighborhood domains/hosts with phony TLDs to my COMPUTER.

You can do this by editing and enhancing the documents C:\Windows\System32\drivers\etc\hosts

Be mindful that on Windows 7 (and also possibly Vista) that in order to efficiently modify this documents you require to run your full-screen editor as Administrator.

You can add hosts making use of lines that resemble:       www.mysite.local       www.myothersite.local

Once these remain in area, you can set up Apache for these domain and also you'll be excellent to go.

Certainly, this does not function to well examining from various other equipments in the neighborhood network, yet if you're in that scenario it might be far better to make use of a neighborhood DNS web server or to assign the hosts to neighborhood non - mobile IP addresses and also integrate the documents throughout all PCs.

2019-05-09 09:47:54