IIS ignores last part of the URL when contains .js - iis

Navigating to www.mytestsite.com/wwwroot/lib/chart.js/dist/Chart.js i get 404 error response.
Of curse, the file exist in that directory.
Then i tried (just for debuging purpose) to move the file Chart.js to the directory www.mytestsite.com/wwwroot/lib/ and then i navigate again to the same url (www.mytestsite.com/wwwroot/lib/chart.js/dist/Chart.js) and i get the file perfectly.
For some reason, the iis is cutting down the last part of the url www.mytestsite.com/wwwroot/lib/chart.js/dist/Chart.js

Related

IIS showing directory instead of index.php and gives 404 when i click a file

im new to IIS and am having a few issues with it.
ive uploaded wordpress on a site just to test the site and see if i can get it connected with mysql.
when i go on the site: www.uacdn.info, it shows a directory of files, even though i have added index.php to the default page, and when i click a file in that directory it gives me a 404 error..
what have i done or not done wrong?
ive tried restarting the website via IIS and adding index.php to the default page and in 1st position.

Missing htaccess file on server?

i've just created a website. It's hosted by GoDaddy and I use cPanel to manage it.
all of my files relating to my website are stored in a public_html folder.
The problem I am having is that I cannot seem to access different pages I have uploaded, I'll show what I mean.
www.website.com --> works fine (defaults to home.html)
www.website.com/About/about.html --> works fine
www.website.com.com/About --> I get the error below:
"You don't have permission to access /About/ on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request."
I would like website.com/About to display about.html.
I think it may be something to do with the .htaccess file? I may of clumsily deleted it at some point.
I have tried to set permissions to 777 on all my public_html files, but I get the same error.
I have tried to locate my htaccess file, but I think its hidden by default. I've tried to find it using a terminal and connecting to my site - also with no success.
Any help to solve this issue would be great cheers!
If /About/ is a directory and these are static HTML files, rename about.html to index.html.
Servers will look for index.html in a directory if nothing else was specified in the URL.

LARAVEL 5 - host web server with API

I am trying to set me local project which works perfectly well on a host server (always data).
I made a project folder on the root (/project) of server where I uploaded all my files
I copied public folder into /www
Exactly how explained on this tutorial :https://medium.com/laravel-news/the-simple-guide-to-deploy-laravel-5-application-on-shared-hosting-1a8d0aee923e
First pages load perfectly, but when I am trying to connect with my api, the redirect URL returns a 403 Forbidden error
My redirect url is htp://.......com/public/play
It works when it is localhost but not on my web server...
Should I put www/play as redirect URL?
Why can I access my view on first page but not after redirection from api?
Thank you very much for the help !
You are not may be copying the content of public folder in the www directory Like it said
Next step is to copy all contents inside the /project/public directory
to www/ directory. The easy example is that, with the fresh Laravel 5
installation application, the project/public/index.php should be
copied to the www/index.php , have you got the point?
and you did
I copied public folder into /www

URL Rewrite not working for *.mp4 file extension

I'm working on a DNN site, and I have a requirement to set up a URL rewrite to redirect incoming requests for a particular URL for an MP4 video to a different location. I can get it working if the incoming URL does not have the *.mp4 file extension, but if the extension is there, the redirect fails and I get a 404.
I set up the rewrite by modifying the SiteUrls.config file to add the following entry:
<RewriterRule>
<LookFor>.*VIDEOFILENAME.mp4(.*)</LookFor>
<SendTo>http://externalsite/video/VIDEOFILENAME.mp4$1</SendTo>
</RewriterRule>
The above configuration results in a 404 if you try to browse to mydnnsite/VIDEOFILENAME.mp4.
However, the following configuration works just fine if you try to browse to mydnnsite/VIDEOFILENAME (without the *.mp4 extension.)
<RewriterRule>
<LookFor>.*VIDEOFILENAME(.*)</LookFor>
<SendTo>http://externalsite/video/VIDEOFILENAME.mp4$1</SendTo>
</RewriterRule>
For whatever reason, the presence of the file extension is preventing the redirect from happening.
IIS is probably setup to route requests with an .mp4 extension to the static file handler, and it isn't getting to DNN to rewrite the request at all. You can look at the Handler Mappings configuration in IIS to see if there's a mapping for *.mp4.
Ideally you'd be doing that redirect in IIS, anyway, rather than sending it to DNN, just to redirect back out.

Could not access php file on core modules's external folder in social engine4

I have installed the plugin 'Advanced Search Plugin Like Facebook Search' of younet and I noticed the error that application/modules/Core/externals/scripts/ynadvsearch.php is not found.
Then I checked the location and the file was there. So I uploaded a test.php file and typed the url in address bar then also I could not access the test.php page. But I am able to access all the js pages on that folder.
I have deleted the htaccess file of external folder. But the issue remains the same.
How can we fix this?
It's a little weird, usually /externals/scripts folder is used only for javascript-files (and all php-files - inside of /controllers folder).
File .htaccess inside of /externals folder contains a rule
<FilesMatch "\.avi|flv|mov|wmv|wma|mp3|mp4|m4a|mkv|swf|pdf|doc|ppt|ico|jpg|jpeg|png|gif|js|css)$">`
It means that *.php files are not allowed for access inside of this folder.

Resources