File Manger: comuploads in URL

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
ptysell
Forum Members
Forum Members
Posts: 33
Joined: Tue Oct 10, 2006 1:16 am

File Manger: comuploads in URL

Post 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.
User avatar
pixelita
Power Poster
Power Poster
Posts: 388
Joined: Sun Sep 16, 2007 3:07 am

Re: File Manger: comuploads in URL

Post 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.
Submit your site to the We Love CMSMS showcase
Locked

Return to “[locked] Installation, Setup and Upgrade”