.htaccess file location for OpenStack with Go - .htaccess

I'm using OpenShift, and I'd like to know where the .htaccess file should go with Go language (golang). I tried all locations with other languages, none of them worked.
Edit:
Yes, I created a 1 small gear application with Go language cartridge. Everything default, so it's The Go Cartridge

I guess you are using the Go cartridge; as far as I know it the .htaccess file should be on the web server gear. Your web server should run on the primary gear but without any other info it's hard to provide a meaningful answer.

Related

Howto get list of IIS changes

I've made some tweaks here and there on an IIS7, and am about to migrate to IIS8. How can I get a good overview of the things I've been poking with? Mime-types, rewrite-rules etc.
WinMerge would be nice - towards the default files. But I'm guessing IIS won't let me of the hook that easy, right?
Besides application level configs, you can try to WinMerge on the following configuration files:
%windir%\Microsoft.NET\Framework\framework_version\CONFIG\machine.config
%windir%\Microsoft.NET\Framework\framework_version\CONFIG\Web.config
%windir%\system32\inetsrv\config\ApplicationHost.config

URL rewriting in IIS for a php/linux guy

I'm a PHP/linux guy....
One of my customers came to me with an existing website/hosting package....
The hosting is windows (but with PHP.....I don't know, it just is)
I need to learn how to rewrite URLs in IIS..
I understand you usually do it with a separate thing you install, called url rewrite module?....Or, is there an equivalent of the .htaccess file which i can place in the root folder?
If yes, is this something that I should expect the hosting company to already have installed?
Is it done in PERL regex in IIS?
Please HELP.
I can't change the hosting comapny or any variables (windows/linux) in the current hosting as my customer cannot have a second where the site is down...so i need to know how to rewrite urls in windows/IIS
I am willing to learn little things like this anyways, for future situations...
It's IIS 7...windows 2008 and PHP...
I don't know if it's against rules to mention names of companies...please don't grill me if it is, just giving as much info as possible and maybe someone will have the same experience as me....
its fasthost..
Thanks
If you have access to the server / IIS then you can install http://www.iis.net/downloads/microsoft/url-rewrite
This will add a module where you can configure rewrites and redirects.
If you dont have access to the server / IIS and this module is installed then each web root will have a web.config file which contain the rules and other IIS configurations. You will have to contact the hosting company to see if the module is installed. It usually is.
This page gives an overview of both:
http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module

Error 403.14 when serving page from IIS

This is very simple to reproduce:
Create a new VM (xtra small in my case, tried both Windows 2012
and 2008R2)
Install IIS using default config.
Create a Web Site using IIS Manager specifying a folder such as
C:\inetpub\simple.
Using Windows Explorer, create a new file called index.txt
Rename the file to index.htm
Edit the file with Notepad to make it a basic but valid html5
document and Save.
From IIS Manager, select the new website and click the Browse
Website link on the right side of the screen.
I get:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
Now look at the Contents of the web site in IIS Manager and you will see that the file has a .txt extension pasted onto the end : index.htm.txt
This does not happen on my local server.
I am new to Azure and probably missing something very basic but right now I feel like I am going insane. Can anyone put me out of my misery?
This is IIS configuration issue, not Azure specific. And I would not even say it is an issue at all.
index.html is not in the list of default documents for IIS. And has never been. index.htm however is. You get 403.14 forbidden, because Directory Browsing is by default forbidden in IIS. Again, absolutely typical IIS configuration which hasn't changed for ages!
Your solutions:
Configure index.html to be in default documents (read how to do this here)
enable directory browsing (read how to do it here)
For the sake of others as stupid as me, this is all down to Windows Explorer configuration. Normally, the first thing that I do with a new Windows install is to turn off 'Hide known filename extensions'. This time I forgot.

Drupal menu items and blog entries disappeared for anonymous users

I've been struggling with a problem now for a few hour and I cannot find any answers or anyone with the same problem -
Some menu items are missing on my site www.namhost.com (Drupal 6.22) and when viewing the blog it shows "No blog entries have been created". When I log in as admin everything works fine, so this problem only occurs for anonymous/guest users.
I've changed nothing on the site which may have caused this problem and here comes the really strange part - When viewing a copy of the site locally everything works 100% even for anonymous/guest users.
I've tried:
flushing caches
rebuilding permissions
checked if the "anonymous" user is present in the database
viewing on different browsers
None of these yielded any results.
Because the problem doesn't occur locally I'm starting to believe this could be a problem on the server the site is hosted on (Linux with PHP5.2), but the admins had a look and couldn't find anything.
Any help/insight would be highly appreciated.
================FIXED<<<<<<<-----------------------------
I am not allowed to answer my own question and it was suggested that I edit the question to include my answer so here goes:
Firstly, thanks for all the responses.
I disabled the "ACL" module (http://drupal.org/project/acl) and the problem was solved. It was previously used for our forum which was also disabled a few months back, so it's not needed any more.
I still have no idea why this module caused the site to work locally but not on the server. I will be in contact with the server admins to find out if they changed/updated anything on the server which may have caused this module to cause a malfunction.
Any insight could still be helpful top prevent this from happening again.
Check your Drupal config:
Are you using node_access, content_access, or any other permissions-related addon mods? Disable them and see if the problem persists. If that doesn't work, disable all non-core mods and re-enable them one-at-a-time until you find the offender.
Compare your hosting configs:
If it's not related to Drupal, compare the local and remote server configurations. Do both use the same versions of php, apache, apc, cgi, etc.? A phpinfo(); on both servers should give you the most important details for comparison. Do a similar comparison of the MySQL setup and content. Finally, check for differences in your .htaccess files (if any) between the two locations.
Test another hosting enviornment:
Download a virtual appliance like QuickStart which is already configured to host Drupal sites for development and non-production purposes, and see if the site works correctly in that. If it does, you could do an additional validation by porting to a new host who offers a trial/money-back-guarantee and see if it works correctly there.
If your site works fine elsewhere, give your current host a good thrashing for making you go through all of this to figure out the problem lies on their end.

URL Rewrite Deploy to Production Server

I've finished url dynamic rewrite module on my local computer, iis, everything is working but I have to deploy it to the production server now, which will cause errors. Do you have any idea how to avoid them?
If you have done similar thing before...
Thanks in advance
You could create a copy of the production server in a virtual machine and try to deploy your rewrite rules there.
VirtualBox is a simple engine to create a VM.
I do mine within a test vm environment then make my edits to the Production Site off hours to avoid the IIS Restart when saving rules.
If you want to move them up in one piece I have thought of making the edits to the machine.config file but after some discussions with our IT group found that was not a workable solution. Editing the rules on the Web Servers then testing them after being added is the course I have followed so far.

Resources