I am new with drupal and stuck at one place.
Uploaded the website in subfolder, So the website path looks like
www.example.com/website/
the website works but images in website dont
as the src in images is like
/sites/default/themes/livinmin/images/fb-icon.png
Due to this its taking / 2 times and did not able to load the images.
There is a Parameter called $base_url in sites/default/settings.php that you can set to, say http://www.example.com/website that Drupal should use for generating your links correctly.
Related
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.
I installed Drupal on my website. It works perfectly but to reach the front page I'm systematically redirected to a page called "Index of" and I have to click on the subfolder drupal-7.12/ to reach the front page. So, the real url for my website i guess is
http://www.mysite.com/drupal-7.12
On my ftp server is organized like this:
Folder public_html
-> Folder drupal-7.12 + a file .htaccess
There is another .htaccess file inside the folder drupal-7.12
I know that I have to modify one of them but i don't know which one and what i have to modify ?
I hope that someone will understand my problem and could help me
Thanks
ML
I would suggest that you remove the folder in drupa.7.12 and move everything up one directory. Basically you are set up as:
Mysite/drupal7.12
move all the contents of drupal 7.12 up one directory to your public_html folder
Or you need to edit the htaccess in the public_html folder to redirect you to that folder. But that is going to cause some issues in the long run.
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 :)
How can I, using the Sharepoint object model, get the URL to an image placed in the mapped images folder?
(added) I am deploying the image as part of a Visual Web Part (named ProgressWebPart for my site).
You should use the server relative url for static images:
/_layouts/images/ProgressWebPart/myImage.png
While the site relative url (no leading slash) will work, consider what happens when your web part is used in two separate sites. A user visiting these two sites would request the following images:
http://server/site1/_layouts/images/ProgressWebPart/myImage.png
http://server/site2/_layouts/images/ProgressWebPart/myImage.png
Even though both requests return the exact same file, the browser considers them distinct because they have different urls. By using the server relative url, you ensure that the user only downloads the static file once. If they visit other sites which use your web part then the browser will use the copy inside it's cache saving both time and bandwidth.
You don't need to use the OM to get this - its static and determined how your solution is packaged.
For an example - the default site logo for SharePoint 2010 will be here
_layouts/images/siteIcon.png
So http://yoursite/_layouts/images/siteIcon.png
and htp://yoursite/yoursite/yoursubsite/_layouts/images/siteIcon.png
It turns out to be (for my 'ProgressWebPart'): "_layouts/images/ProgressWebPart/"
As such, loading a PNG file into an Image control can be done in C# with:
Image image = new Image();
image.ImageUrl = "_layouts/images/ProgressWebPart/myImage.png";
I've been reading a bit about serving my images, javascript and css from a seperate domain.
I have set up a domain, not a sub domain but a new account on my server.
My site is for example: http://www.site.com
I have set up a new account for http://s1.site.com
To cut it short, I have about 40gb of images, so rather me moving it (would also require me to update a few of my scripts as I have scrapers to grab images) I was wondering if there was a way to point my new sub-domain to my other content?
Basically, I want to create a .htaccess file on s1.site.com and get it to pull the info from www.site.com, for example:
http://www.site.com/images/picture.jpg
becomes
http://s1.site.com/images/picture.jpg
But the image doesn't really exist on the s1.site.com, we are just 'mirroring' it using htaccess to save the hassle of copying everything over to the static domain.
Please let me know how this is possible, as it would save me a great deal of time and would work wonders.
I basically just want to make anything on
http://s1.site.com/* pull from /home/originalsite/public_html/(images/js/css folders)