Clean URL & Image Upload - .htaccess

I have already posted this in a Drupal forum. I currently have problems with uploading images and using clean urls on the site.
When I upload an image to an article page and then I click refresh to view the page, the image doesn't appear. I check for the image url and an example url would be:
http://example.com/sites/default/files/styles/large/public/field/image/01.jpg
but the image would appear if I modify the url on the address bar to:
http://example.com/?q=sites/default/files/styles/large/public/field/image/01.jpg
I have tried:
turning on and off clean urls (sometimes the images appear, but then
they disappear again)
modifying rewrite rules in the the .htaccess file
folder permissions
This happened when I uploaded my site to an apache server and the url changes, but doing it locally on my computer, the url don't change.

I went on another direction with my photos but I figured it out anyway. All I had to do was to delete the .htaccess file in the site/default/files.

Related

Not Found The requested URL was not found on this server. Simple HTML CSS website

I created an easy HTML CSS website and need to put it into the SFTP server. I used FIleZilla and put everything inside. I did put everything inside the folder of the old website (where URL worked) and now I can't access the URL.
enter image description here output of the webpage.
I put everything inside of the folder.

Changing Outgoing Links via HtAccess but with exceptions

Hi there on my site i link to a site that has changed the url of the site but uses the original domain to host the images. Is this possible to catch the links via htaccess but no change any of that domain with an image file detected?
So change outgoing link from www.oldsite.com to www.newsite.com but if images detected leave oldsite.com url.
I have too many links to change manually, is this even possible ?
It can't be done using .htaccess . .htaccess is directory level Apache configuration file!

Detect if an image is on a malware url before displaying?

My chrome extension displays images from external pages (just their favicons in case that matters). The problem is that sometimes after storing the link to these favicons the site in question becomes listed as malware. This causes my extension popup to show a malware warning when trying to display the image.
My question is, is there a way for me to prevent this from happening? Perhaps there is a way for me to test a url is safe before attempting to display the image?
You could replace your image urls by an URL of yourself. And let your server check if the url is a malware site.
I would say this would involve a couple of steps:
Change the favicon links to a link of your server
On the server determine if an URL is a malware site. (So you have to find out what blacklist chrome is using.)
if it is a malware site show some favicon of your own
if it isn't, redirect to the actual site

Drupal 6 site not displaying image links

Having a very strange issue which I hope you can help me with.
No errors in Apache logs. I am running a Drupal6 site, with only a few images that are failing to display.
The site's url is configured as a subdomain, i.e. in sites, directory domain.com.insurance contains all the drupal files, modules, etc.
Using Firebug their relative URLs are set to:
/insurance/files/webfm/auth/insurance_profiles/profile4.jpg
Visiting this file throws a drupal not found page.
The problem here is the URL specified by the developers.
Instead of :
/insurance/files/webfm/auth/insurance_profiles/profile4.jpg
Correct URL is:
/insurance/sites/insurance/files/webfm/auth/insurance_profiles/profile4.jpg
Thats it, hope it helps :)

is it possible to redirect a link to a pdf file

is it possible to redirect a link to a pdf file?
This is my site: www.mysite.com
And I createad a redirect link that if I open www.mysite.com/documentation - an index.html file will open but for now this index.html file says it's under construction.
Can I redirect the link to a pdf file?
I uploaded the pdf file into the server. So that if I open www.mysite.com/documentation, my pdf named as thedocument.pdf will open.
Is it possible?
If your web hosting provider won't allow you alter the default extensions (i.e. to add pdf) then you could create a HTML page to act as the landing page and then redirect to the PDF.
Details here: http://www.web-source.net/html_redirect.htm
Yes, this is possible. Check your web server configuration that currently points /documentation to index.html, and change it to point to thedocument.pdf.
Be aware that the PDF may or may not load in the user's browser. Some configurations will prompt the user to download the file.
You can achieve this with a modX Weblink.
Upload your pdf to a place from where it is publicly downloadable. For this example I will upload it to modx/assets/content/test.pdf. You should now be able to download your file from http://yourdomain.tld/assets/content/test.pdf.
Create a new weblink resource in modX (Site -> New Weblink) on the base level of your resource-tree. Make it a container and type in 'documentation' as the alias of your resource. You should also make sure, that you already use friendly urls, but your question sounds like you're already doing this.
A weblink has a field to enter the 'weblink' instead of the ressource content. Just use the URL from which you are already able to download your pdf-file. In this example, this would be http://yourdomain.tld/assets/content/test.pdf.
If you now view the newly created weblink resource under http://yourdomain.tld/documentation, you should instantly download a copy of your file test.pdf.

Resources