Redirecting index.html to root + folder index.html to root folder? (multilingual)

I have page. I want a homepage without index.html ( ->

RewriteEngine On RewriteRule ^index\.html$   / [R=301,L] RewriteRule ^(.*)/index\.html$   /$  1/ [R=301,L] 

It works but what rule to create for folder /de/ (language)?

Code above in folder /de/ redirects me to ( or -> Correct link:

How to make a rule for /de/ folder? How to modify rule?

Expected effect -> -> 

Sharepoint problem creating two views for top level and folder level

I have a doc library which is using a content type. This doclib has subfolders. The subfolders have word / excel documents.

My requirement is two views (both default views)

  1. when you click on the library the folders underneath show up as a list as usual. for that, edit the “All Documents” view and change the folders setting Show this view = In top level folder.

  2. And then I need a different view when any folder is clicked. this view will have a group on one of the column, and in the folders setting under “Show this view:”, “In folders of content type: Folder” should be selected, also mark this view as default also.

When I do this manually, it works fine as per Need a different views for Folders & Files in Document Library

So basically the end result that I need is two views as below

Views—————–Show In———-Default View

All Documents———–Top-Level—————–Yes


when I use code, it is not working.

Below is my code:

        SPSite site = properties.Feature.Parent as SPSite;         SPWeb web = site.RootWeb;          SPDocumentLibrary lib = web.Lists["libraryName"] as SPDocumentLibrary;          StringCollection strViewFields = lib.Views["All Documents"].ViewFields.ToStringCollection();          string viewQuery = @"             <GroupBy Collapse=""FALSE"" GroupLimit=""100"">               <FieldRef Name=""AColumn"" Ascending=""TRUE"" />             </GroupBy>";          var folderView = lib.Views.Add("FolderView", strViewFields, viewQuery, 100, true, false);           //folderView.ContentTypeId = new SPContentTypeId("0x0120D5");         //folderView.ContentTypeId = new SPContentTypeId("0x0120");          folderView.ContentTypeId = SPBuiltInContentTypeId.Folder;         folderView.DefaultView = true;         folderView.Update();           var allDocumentsView = lib.Views["All Documents"];         allDocumentsView.ContentTypeId = new SPContentTypeId("0x012001"); //"In the Top level folder"         allDocumentsView.DefaultView = true;         allDocumentsView.Update();           lib.Update(); 

But when I run this code, go to my document library’s settings, under Views… I see the All Documents View as default and FolderView is not default and “Show In column” is empty.

The FolderView although it gets created but it does not show as default and does not show the folder setting. When I click on the Folderview and hit OK button without any changes, the folder setting now magically shows up as “Show In” Folder.

Is this a bug in my code? Can any one please help? Basically I am trying to do this in code as per this!

Create the view to show at the root set it as default view

Create the view to show inside folders set it as default view, but also down in the folders section set Show this view to In folder of content type: <Your folder content type>

Go back to the root view and change Show this view to In the top-level folder

Any ideas?

Encrypt folder on Linux that can only be decrypted on that specific OS and device

Suppose I want to give a computer to someone that runs an application. I want to avoid that the program can be copied to another computer or be tampered with. For that, I want to encrypt the folder that contains the program and would like to make it so that only the host OS (Linux) on that device can decrypt it (ie. also avoid moving the disk between computers). There is no TPM in the computer. Secure boot is already running, but is seems that this gets reset when resetting the CMOS. The application requires network, so that is already available.

Is this possible? I don’t really see how this can be done, if possible. And it not, how far can I get to make it as difficult as possible?

user gets access denied when adding new document in folder

In my SharePoint 2013 environment I have a site where the admin user group has design rights + security management rights. A readers permission group has read access on the site. I have a document library with one folder. On the folder I break the inheritance and give the readers group contribute access.

When the user from the readers groups wants to add a new document (Ribbon –> new document –> document) he gets a pop-up with an access denied message.

Why can’t the user add a new document with contribute access?

The URL is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web?

I am trying to upload documents to SharePoint 2010 site and i am getting the following error.

The URL ‘aaa.pdf’ is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web

How can i fix it ?

Create a new folder with custom content type id using custom action

I am adding a custom ribbon button which needs to create a folder with specific content type id in a document library.

CommandAction="javascript:{                         var options = {                            url:'http://test-site-2019/test/Forms/Upload.aspx?RootFolder=%2FSCDM%26ContentTypeId=' + 'EACB0B22-9AAC-4291-A0EE-F91C3F66AC96',                           title:'New Test Folder',                           dialogReturnValueCallback: function (result, message) {                             if(result === SP.UI.DialogResult.OK) {                               SP.UI.ModalDialog.RefreshPage(result);                             }                           }                         };                         SP.UI.ModalDialog.showModalDialog(options);                       }" 

I am sharing the code above. Problem is that when click the button, the modal dialog is succesfully opening but showing the normal upload.aspx page which requires to upload file and then to fill the properties. The desire result is to show window which gives us the opportunity to type the name of the folder and the custom fields to fill and to be added to the document library. The Id which I am putting in the url is the content type id of the desired content type.

Any suggestions what I am doing wrong?

copy file from sharepoint to local folder with vba

I need urgently help with VBA and SharePoint.

I want to copy a file from SharePoint to a local folder. The script below is running on my PC. But I am a local admin. I figured out that on a “normal” PC with a “normal” user (no local admin) the script is not working. It stops at WinHttpReq.Send.

If the user is going directly to the SharePoint there is no problem to copy the file.

Does anybody can help me?

Many thanks

Sub DownloadFromSharepoint_DB()  Dim myURL As String  Dim WinHttpReq As Object  myURL = "sharepoint/link/test.accdb   Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")  WinHttpReq.Open "GET", myURL, False  WinHttpReq.Send   If WinHttpReq.Status = 200 Then  Set oStream = CreateObject("ADODB.Stream")  oStream.Open  oStream.Type = 1  oStream.Write WinHttpReq.ResponseBody  oStream.SaveToFile ("C:\test\test.accdb"), 2  oStream.Close  End If   End Sub