GetSimple Support Forum
Default .htaccess for root of a GetSimple install - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Installation & Setup (http://get-simple.info/forums/forumdisplay.php?fid=5)
+--- Thread: Default .htaccess for root of a GetSimple install (/showthread.php?tid=326)



Default .htaccess for root of a GetSimple install - sal - 2010-01-21

I was hoping someone would be so kind as to paste the default .htaccess file that appears in the root directory of a GetSimple install. The reason for this is it seems it is missing and isn't created when I tick "Use Fancy URLs" under Settings. I thought if I just manually create it that this would get Fancy URLs working.

Cheers.


Default .htaccess for root of a GetSimple install - internet54 - 2010-01-21

Code:
AddDefaultCharset UTF-8
RewriteEngine on

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9-]+)/?$ index.php?id=$1 [L]



Default .htaccess for root of a GetSimple install - sal - 2010-01-21

Thank you. I've added it to a base htaccess file I usually use.

Code:
# Set up for rewrite rules
Options +FollowSymlinks
RewriteEngine On
RewriteBase /

# Force www on domain name
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

# Exclude admin directory from rewrite rules
RewriteRule ^(admin) - [L]

# Rewrite for Pretty URLs support
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9-]+)/?$ index.php?id=$1 [L,QSA]

# Disregard seemingly malicious scripts
RewriteCond %{QUERY_STRING} (base(dir)?|(classes|lib)_dir|error|inhalt|page|path)=|root_dir|request|session|http:// [NC]
RewriteRule .* - [F,L]

# Try to compress JS and CSS files
<IfModule mod_deflate.c>
<FilesMatch "\.(js|css)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>



Default .htaccess for root of a GetSimple install - ccagle8 - 2010-01-21

The install procedure should create the .htaccess, but if it doesn't, you can copy the default file from
Code:
/admin/inc/tmp/



Default .htaccess for root of a GetSimple install - internet54 - 2010-01-22

Chris, it's my understanding that the .htaccess file will not be created unless that folder has write capabilities. On localhost it installs fine, but on my server, I had to 777 my public_html folder in order for it to be created.

I think a default .htaccess file should be included with downloads. Just have it renamed something else so if anyone needs it it is there.


Default .htaccess for root of a GetSimple install - ccagle8 - 2010-01-22

Maybe... i've seen other installations do it that way. We will still need to be able to write to it though.. the base url still needs to be changed to match where it is relative to the URL you are installing it to.


Default .htaccess for root of a GetSimple install - Nijikokun - 2010-01-22

You will have to 777 public_html most of the time, or the .htaccess file itself.


Default .htaccess for root of a GetSimple install - internet54 - 2010-01-23

It's worth a shot to include the .htaccess file and auto set it to / as the base.
Have the installation require chmod 666 on the file.


Default .htaccess for root of a GetSimple install - Nijikokun - 2010-01-23

.htaccess files don't work like that


Default .htaccess for root of a GetSimple install - internet54 - 2010-01-23

^ What do you mean? Anyone can chmod a .htaccess file.


Default .htaccess for root of a GetSimple install - Nijikokun - 2010-01-23

but inclusions? include where?


Default .htaccess for root of a GetSimple install - Zegnåt - 2010-01-23

I think he means to include it in the main folder by default. Not include as in a PHP include ;-)


Default .htaccess for root of a GetSimple install - internet54 - 2010-01-24

^ What Ziggy said Smile

Then at the beginning of the installation, check to see if it is chmoded correctly.


Default .htaccess for root of a GetSimple install - Nijikokun - 2010-01-24

if done correctly it could work. I'll work on something later.. and by later i mean at like 10pm cause I have to work.