Support

Admin Tools

#29959 .htaccess

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by dlb on Monday, 16 July 2018 22:07 CDT

jparker3119
I can upload files to /media/com_jbusinessdirectory/ when not using the .htaccess file.

But when using the admintools created .htaccess file, I cannot.

Again using the admintools .htaccess file creator, I added the rule

RewriteRule ^media\/com_jbusinessdirectory\/pictures\/companies\/39/ - [L]

specifically for testing but was unable to upload a file.

Of course, I need to be able to access all the sub-directories of media/com_jbusinessdirectory/

Please advise.
Thanks,
Jim

dlb
Jim,

I don't see anything wrong, but .htaccess is not my friend. What exactly are you trying to upload? By EXACTLY I mean the file extension, including case. Remember, the allowed file types are case sensitive, so if you're trying to upload a JPG file, it won't work.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

jparker3119
Thanks for your reply.

Were you able to view the htaccess file that I attached? If you are not, I will copy it directly to this reply.

But jpg and png file are the two major files extensions that I upload and they are both lower case. Nonetheless, htaccess files created by admintools seem to include both lowercase and uppercase in the rules as shown in the following example taken from the htaccess file.

RewriteRule ^(components|modules|templates|images|plugins|media|libraries|media/jui/fonts)/.*\.(jpe|jpg|jpeg|jp2|jpe2|png|gif|bmp|css|js|swf|html|mpg|mp3|mpeg|mp4|avi|wav|ogg|ogv|xls|xlsx|doc|docx|ppt|pptx|zip|rar|pdf|xps|txt|7z|svg|odt|ods|odp|flv|mov|ico|htm|ttf|woff|woff2|eot|JPG|JPEG|PNG|GIF|CSS|JS|TTF|WOFF|WOFF2|EOT)$ - [L]
RewriteRule ^(components|modules|templates|images|plugins|media|libraries|media/jui/fonts)/ - [F]

Regards,
Jim

dlb
Jim,

Yes, I was able to read the .htaccess file - but I had the line wrap turned off so I missed the end of the line.

I talked to Davide this morning and he pointed me in another direction. What are you using to upload the image files? Is is an extension or core Joomla! code? If it is an extension, it may be using a custom entry point (like components/com_something/upload.php) that is blocked by the .htaccess Maker. If that is the case, you can identify the exception needed with the instructions here: https://www.akeebabackup.com/documentation/troubleshooter/athtaccessexceptions.html.

If that doesn't work, please let me know, I'll need connection details and I'll need to make the ticket private first.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

jparker3119
I followed the instructions provided in the link above and it worked like a charm!!!
Thanks!
The line that needed to be added to was:

components/com_jbusinessdirectory/assets/upload.php

Again,
Thanks,
Jim

dlb
You're welcome! I'm glad that fixed it.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!