Posts: 161
Threads: 6
Joined: Jan 2010
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.
Posts: 339
Threads: 27
Joined: Nov 2009
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]
Posts: 161
Threads: 6
Joined: Jan 2010
2010-01-21, 17:11:54
(This post was last modified: 2010-01-21, 17:15:57 by kuba.sanitrak.)
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>
Posts: 1,848
Threads: 86
Joined: Aug 2009
The install procedure should create the .htaccess, but if it doesn't, you can copy the default file from
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 339
Threads: 27
Joined: Nov 2009
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.
Posts: 1,848
Threads: 86
Joined: Aug 2009
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.
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 111
Threads: 14
Joined: Jan 2010
You will have to 777 public_html most of the time, or the .htaccess file itself.
Posts: 339
Threads: 27
Joined: Nov 2009
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.
Posts: 111
Threads: 14
Joined: Jan 2010
.htaccess files don't work like that
Posts: 339
Threads: 27
Joined: Nov 2009
^ What do you mean? Anyone can chmod a .htaccess file.
Posts: 111
Threads: 14
Joined: Jan 2010
but inclusions? include where?
Posts: 972
Threads: 27
Joined: Aug 2009
I think he means to include it in the main folder by default. Not include as in a PHP include ;-)
Posts: 339
Threads: 27
Joined: Nov 2009
^ What Ziggy said
Then at the beginning of the installation, check to see if it is chmoded correctly.
Posts: 111
Threads: 14
Joined: Jan 2010
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.