How to access a text file in root directory from a browser in Liferay 7.2? - directory

I need to access a text file (ads.txt) from a browser (ex: https://mydomain/ads.txt) in the ROOT directory in Liferay 7.2.
Thx
It works fine if the file is in the html directory (https://mydomain/html/ads.txt). It works fine if the file has a jsp extension (https://mydomain/ads.jsp).

Related

Website 404 error when I move files to root directory

My all files exist in subdirectory jbsafi.com/rahmatkhancopy in file manager. I want to move all the files to root directory but it displays 404 error when I do so. What is wrong with my file? May be something wrong with my .htaccess file but I don't know how to resolve it. The .htaccess file is blank now.

cppcms: 404 error for css and js files

I am using cppcms ver 1.2, and want to include external css and js files as follows:
media/css/bootstrap.min.css
But I get a 404 error for them, even though the files exist in the media folder in my root folder of the app.
I tried copying the media folder manually to the CMakeFiles folder. But that didnt work also.
Still keep getting a 404 error for localhost:8080/media/style.css or any of the other css or js files.
What is the document root of the cppcms, and if it is the root folder where the code is, then why isnt it able to read them?
My code is modelled on the examples/message_board sample.
The problem was beig caused by the redirect in the config file which was redirecting everything to the root url. Added exclusion there for the media folder, and the message_board sample and my code worked.

Can linter-flake8 ignore files by using a project-wide .flake8rc?

I'm using Atom and linter-flake8 for my project. I have a set of huge generated Python files and I want them ignored by linter-flake8. These files are placed in a folder called generated/, inside the project root folder. At the same level with the generated/ folder, I placed a .flake8rc with the following content:
[flake8]
exclude=generated/
and configured linter-flake8 to use this file (via Preferences in Atom). However, it still parses those files. What am I doing wrong?
PS: If I run flake8 --exclude=generated/ . in bash, in the project root folder, it works fine and ignores my files.

OpenX php file in images directory

In my openx directory
openx/www/image
I have a php file that looks like c7dc84ecdf4fee7.php
Should this file be there? or its a malicious file?
By Default openx/www/images contains ,
openx/www/images/layerstyles/*
openx/www/images/robots.txt
openx/www/images/1x1.gif
Only Image Banners will be stored here .
.php maybe malicious code
Immediately remove that .php file

Uploading a file with VS2010 "Publish" to custom directory

I have a file I need to have published with my ASP.NET site to the server. I put it in the project root and set 'Copy to Output Directory' to 'Copy if newer'. When I publish, it copies the file to a 'bin' sub-directory. No good! I need it at the root of the site. Other files (such as my *.aspx files) that are right next to it in my project get copied to the root. How do I set it so this file also get copied to the root?
Change the "Copy to Output Directory" to "Do Not Copy", then Set the Build Action to "Content". Copy to output directory copies the file to the bin folder. You would use that feature to copy a license file needed for the assemblies for example. Setting the build action to Content causes the file to be sent to the server in its relative place.

Resources