Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Default .htaccess for root of a GetSimple install
#1
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.
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
#2
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]
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#3
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>
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
#4
The install procedure should create the .htaccess, but if it doesn't, you can copy the default file from
Code:
/admin/inc/tmp/
- 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!
Reply
#5
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.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#6
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!
Reply
#7
You will have to 777 public_html most of the time, or the .htaccess file itself.
http://nijikokun.com
random stuff. idk.
Reply
#8
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.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#9
.htaccess files don't work like that
http://nijikokun.com
random stuff. idk.
Reply
#10
^ What do you mean? Anyone can chmod a .htaccess file.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#11
but inclusions? include where?
http://nijikokun.com
random stuff. idk.
Reply
#12
I think he means to include it in the main folder by default. Not include as in a PHP include ;-)
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#13
^ What Ziggy said Smile

Then at the beginning of the installation, check to see if it is chmoded correctly.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#14
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.
http://nijikokun.com
random stuff. idk.
Reply




Users browsing this thread: 1 Guest(s)