Cannot enable server side includes in IIS5 - html

I am trying to enable server side includes in some plain html files. I need help enabling ssi via IIS on the localhost. I am running XP Pro, and using both ie8 and firefox to test the files.
Thanks for your help.

Here is how to do it:
Open IIS admin on your local machine
Expand the local computer tree in the left pane (where it says COMPUTERNAME (local computer)
Under Web Service Extensions node, click Server Side Includes in the right window pane.
Right-click and select Allow.
There you go.
EDIT:
If you want to map a non-default (.shtml/.shtm) extension to SSI, you'll have to add it to your default site. You can do this by:
Right click your website in IIS, select Properties
Click the Home tab
Click the Configuration... button
Under the Mappings tab, click the Add button
The fields should be:
Executable: - C:\WINDOWS\system32\inetsrv\ssinc.dll
Extension: .whatever
Verbs: Limit to GET,POST
Script engine: checked
Verify the file exists: checked
You'll have to try it out with .html files.. I'm not sure the consequences of mapping standard HTML files to work with SSI. I would think you're going to negatively impact performance as now IIS will treat all .html files as dynamic even when you aren't including them? Worth trying though I guess. An alternate solution would be to use the traditional .shtml/.shtm extensions..

Related

Not allowed to load local resource in console for using live server at vs studio

I've tried by changing the IP address and also changed the default browser, but still not working.
Check if you have written a nasty code which blocks some of the function of live server. Just go on element tab in dev tools and scroll down to check the script written after <-- Code Injected by Live Server -->.
See whether you have used the same name for any function in your any js file. If so just change their names. If this does not work then try to reinstall live server extension.

I built my Unity on HTML5 WebGL and this error message shows up when I try to launch it

Unable to parse Build/Pain.framework.js.br! Loading pre-compressed (brotli or gzip) content via a file:// URL without a web server is not supported by this browser. Please use a local development web server to host compressed Unity content, or use the Unity Build and Run option.
Monopoly A3
The message is pretty self-explanatory: you'll need a local server to do that. They're countless ways to do that but here's one of them:
XAMPP
Just download it and run it (The XAMPP Control Panel - Apache -> Start). Then put your files in C:\xampp\htdocs\ (On Windows, not sure for other systems).
C:\xampp\htdocs\ Will be the equivalent of http://localhost in your browser, so if you put example.txt in C:\xampp\htdocs\, it will be available at http://localhost/example.txt.
Other options
XAMPP is my personal favorite, but they're other options, like the other *AMP, like WAMP, MAMP and LAMP, for Windows, MacOS, and Linux respectively (XAMPP being multiplatform - Also more exist is you're curious).
They're also "simpler" solution (in the sense of more lightweight ones) like http-server for NodeJS, or Python's http.server. But they need to be executed on the right folder each time. Both solutions works fine so it's up to you to choose your preferred.

How to use live edit with router script in PhpStorm

I setup live edit in PhpStorm and it works great. While implementing routing in my application, I configured PhpStorm to use a routing script using the Built-in Web Server run configuration. At this point, live edit stopped working because it seems to work only with the built-in webserver and not the PHP built-in web server. (Technically, it didn't stop working, rather there were two run configurations: live edit where the links returned a 404 and a routing configuration that doesn't have live edit.)
Is it possible to use both live edit and a routing script?
Does anyone have any workarounds to using live edit or similar functionality when working on an app that uses routing? I currently have a keymap (Alt-R) setup for Reload in Browser.
I'm using PhpStorm 10.0.2 (PhpStorm-143.790) on CentOS 7.
Note: I found two issues relating to live edit and routing but neither was helpful.
https://youtrack.jetbrains.com/issue/WEB-15762
https://youtrack.jetbrains.com/issue/WI-20824
Thanks
A hint in the 2nd URL above provided a suitable workaround. The key lies in the fact the link between the browser and PhpStorm is not tied to the URL; only the tab. To make this work, you need two run configurations:
A JavaScript Debug configuration for live edit. Make sure live edit is working.
A PHP Built-in Web Server configuration with the router script enabled.
Run the JavaScript Debug configuration and it will open a tab in Chrome linked to PhpStorm. Then start the PHP Built-in Web Server configuration and change the "live edit" tab to the URL for the built-in web server. Any changes will automatically refresh the tab using the PHP Built-in Web Server configuration which contains the router functionality.
This concept can also be applied to any functionality not supported by the built-in web server, like SSL. You just need a 2nd web server (built-in or external) and change the live edit tab to the 2nd URL.

Adding a .htm file to an IIS website asks for username and password instead of displaying the page

This is probably a simple fix, but I am having trouble googling the answer. What I have done was make a copy of a page that is currently on the site and renamed it. So for example I made a copy of page1.htm and renamed it to page1temp.htm. Now when I try to navigate to page1temp.htm it won't display the page, but instead asks for a username/password. If I navigate to page1.htm it still works as expected. I'm not sure what I am missing here. I am using IIS on a Windows Server 2003 R2.
I'm not sure what I need to change in IIS to get the page to display properly. Any help or clues would be greatly appreciated.
Check the NTFS permissions of the file (for example, by right-clicking on the file in Windows Explorer and checking the Security settings). Compare the permissions for both files. Chances are that the user used for anonymous authentication of your web site (might be IUSR_something) has permissions to read one file but not the other.

HTML uploading problem

i want to upload my first website (it is a simple html file) and when i write on the browser www.examplesite.com it just don't open the site, it opens a raw directory listing where i have to click the "index.html" (which is my site) to get redirected to the real site. How can i fix this? Thanks :)
Do you control the webserver? If so you need to tell the server (ie, Apache, IIS) to use index.html as the "Directory Index". If not ask your ISP to enable it.
Webservers can be configured to server different things as the "default" webpage if browsing to a folder - normally, your local, friendly, server administrator should be able to tell you what name(s) to use - index.html is common, but you could try "default.htm" if it's hosted on a Windows server.