2

Details:

I create virtual hosts for development like http://project.client.dev and then use browsersync for live reloading and whatnot, which creates a proxy at http://localhost:3000. This causes all URLs on the page to be written to http://localhost:3000, which in 99% of cases is exactly what I want, but sometimes I want to link to that original http://project.client.dev path instead.

Question:

Is it possible to have browsersync not update just particular URLs? Like, add a class of do-not-update or something and have those stay http://project.client.dev instead of being updated to http://localhost:3000?

Use Case:

I build WordPress websites. When I'm clicking around the site's front-end I want those http://localhost:300 addresses so live reloading occurs. On the back-end however, I don't want those paths ending up in the database or, worse yet, browsersync reloading my admin screens while I'm editing content. Typically I just open one tab on the front-end and one on the back-end using the respective domains, but I'd like to add an in-development link to the footer that says "edit page ID 123" and opens the current front-end page up on the back-end for editing; problem is, it opens the http://localhost:3000 version of the back-end and I need to manually update the URL every time (provided I remember to do so).

Tomas Mulder
  • 2,207
  • 2
  • 16
  • 18

1 Answers1

0

I think is it not possible at this moment to exclude some URLs. But have a look at the documentation : https://www.browsersync.io/docs/options

Paul
  • 380
  • 1
  • 10
  • I've looked through that and haven't found anything. rewriteRules looked promising but unfortunately it only allows editing the path following the domain, and I need to change the domain. – Tomas Mulder Oct 06 '17 at 17:00
  • Ok, tell everyone that is probably possible using this way :-) – Paul Oct 09 '17 at 07:00