Page 1 of 1

File Manger: comuploads in URL

Posted: Tue May 24, 2011 11:18 pm
by ptysell
(Yes I did a search)

Having trouble getting the file manager to output the correct URLs.

The file manager is outputting URLs in the following format

Code: Select all

http://www.domain.comuploads/directory/file.extension
I am using the stock rewright rules found here:
http://wiki.cmsmadesimple.org/index.php ... l_Settings

.htaccess
http://pastie.org/1968694

config.php
http://pastie.org/1968698


Now if I set

Code: Select all

$config['root_url'] = 'http://www.domain.com/';
The file manager works but it breaks everything else and I end up with URLs like

Code: Select all

http://www.domain.com//page
Its not mission critical but is a total pain in the ass.

Thanks.

Re: File Manger: comuploads in URL

Posted: Wed May 25, 2011 3:26 am
by pixelita
[OOPS! Maybe I misunderstood your problem. If so, ignore this. If it helps someone, I guess leave it here.] :)

I'll try to help you here. I use the User Uploads module quite a bit. Here's an example of a file uploaded via the User Uploads module. Note its URL:
http://idylwood.org/uploads/18/fema-mitigation-2009-pdf

Here is our .htaccess file:

Code: Select all

Options +FollowSymLinks
RewriteEngine on
RewriteBase /

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteRule ^News/rss(.+)$ index.php?page=News/rss$1 [S=1]
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
<Files 403.shtml>
order allow,deny
allow from all
</Files>
We have four categories of documents. They are:
Newsletters (document path: newsletters);
Operating Documents (document path: operating-docs);
Meetings (document path: meetings);
Documents (document path: documents).

In the "edit category" form, in the box Server Path, be sure you DO NOT have a slash before your category name (that's really the folder/directory).

HTH.