Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can i allow a new folder on the root structure?
#1
Hi,

how can i allow a new folder (called: scripts) on the root of GETSIMPLE CMS folder structure?

What must i change in the .htaccess?

Code:
AddDefaultCharset UTF-8
Options -Indexes

# blocks direct access to the XML files - they hold all the data!
<Files ~ "\.xml$">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>
<Files sitemap.xml>
        Order allow,deny
    Allow from all
    Satisfy All
</Files>

RewriteEngine on

# Usually it RewriteBase is just '/', but
# replace it with your subdirectory path
RewriteBase /myenergy/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
Reply
#2
it depends on the kind of files which you want to have there
in general you must change nothing in the general htacces

1) create the folder
2) upload what you want to have there, I assume you want to upload scripts there
3) if you can run these scripts from within a component, it is ok

if not I suggest to create a special .htaccess for that folder /scripts

if you add this folder to the /data/uploads for example it will be ok, I am sure
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#3
You should be able to create folders anywhere. Those !-f !-d rewrite conditions mean "exclude real files and real directories from the rewrite"

Although typically if its scripts as in code for your GS site, you should copy your theme and put it the theme folder.

My alternative on my site for additional non GS content was to use GS in a subdirectory, with a rewrite to account for that. ( Its in the wiki ). Then my web root isn't full of GS assets.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)