SMF Support > SMF 2.0.x Support
Moved to subfolder and images not loading
Storman™:
--- Quote ---I have set "crypt option" from the section of attachment settings before, can it be the reason?
--- End quote ---
Possibly, has the file got an extension like .jpg ..... or does it look like:
106_2c52ead1b6bf0089035c296ba84065f1edbab90b
...or is it's file size zero "0"
MrPhil:
--- Quote from: Storman on May 16, 2012, 08:12:04 AM ---
--- Quote ---...and I m using cpanel 301 redirection.
--- End quote ---
Don't use a redirect - no need !
--- End quote ---
If you have no landing page in the root, you will need to do a URL rewrite in .htaccess so that visitors entering just the domain name will be sent on to your forum automatically:
--- Code: ---RewriteEngine On
RewriteCond %{REQUEST_URI} !^/forums [NC]
RewriteRule ^(.*)$ /forums/$1 [L]
--- End code ---
I would not do a 301 (permanent) redirect, as in the future when you add a landing page, it could cause temporary problems with cataloged (indexed) site entries. You do want to make sure that your forum uses "/forums" in its links, so that search engine indexes and bookmarks will go straight to the right place (and in the future, won't get confused with your landing page when it's added).
Rommeo:
MrPhil you are right
I deactivated 301 but I m using index.php "header location" redirection now ( I have redirection index file in the root ) what do you think?
Storman, you are right too, have that kind of files
106_2c52ead1b6bf0089035c296ba84065f1edbab90b
but file size is not zero
what should I do?
Rommeo:
any ideas?
MrPhil:
What URL are your missing images using? Does it not include the /forums in their path? Have you ever run the repair_settings? Is everything in Settings.php set up for /forums?
Your /index.php will do nothing to fix file requests (such as images) which are still looking for a forums-less path. I would suggest getting rid of /index.php and using my .htaccess code to do the URL rewriting, which will also fix any paths still using the old path (no /forums). This assumes you're on an Apache server. If it's IIS, you may be able to install some module to make it read .htaccess files, or accomplish the same thing with some other kind of configuration file.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version