ritwickdey / live-server-web-extension

It makes your existing server live. This is a browser extension that helps you to live reload feature for dynamic content (PHP, Node.js, ASP.NET -- Whatever, it doesn't matter)
https://chrome.google.com/webstore/detail/live-server-web-extension/fiegdmejfepffgpnejdinekhfieaogmj/
MIT License
801 stars 332 forks source link

Support Javascript-processed fake URLs #103

Open mdrejhon opened 1 year ago

mdrejhon commented 1 year ago

Hello,

In a specific website's .htaccess file, I have all 404 URLs reprocessed by index.html and index.php to re-parse the URLs (Javascript-powered URL parsing)

So I want everything in a URL bar http://localhost:8080/dothis and https://localhost:8080:dothat

To load the same URL (the / which is processed by either the index.html or index.php)

I tried the wildcarded URL route, but it does not work:

image

So, there seems to be no way to support JavaScript-parsed dynamic URLs (nonexistent URLs that "exists" because the main index.html or index.php's own JavaScript reprocesses the URL from the bar to do an action based on a URL).

Can this be added as a feature, either by:

(1) Wildcarded URL match goes to same actual URL; or (2) A way to specify that 404'd pages load a specific URL (so its javascript engine can parse the actual URL to do custom actions).

I might dig into the source to make the change within a few months (if I don't find an alternate extension that lets me redirect all URLs to a single localhost URL) but if anyone can comment on the easiest way to pull this off - let me know.