From bbd3b214d1ba3bb3e31b45f6dfaa4fb1361480bb Mon Sep 17 00:00:00 2001 From: OptimusCrime Date: Thu, 16 Oct 2014 19:21:06 +0200 Subject: [PATCH] Some changes --- .gitignore | 8 ++++++++ .htaccess | 10 +++++++++- README.md | 16 +++++++++++++++- ht.access | 11 +++++++++++ 4 files changed, 43 insertions(+), 2 deletions(-) create mode 100755 ht.access diff --git a/.gitignore b/.gitignore index 3c520fae..8203a102 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,11 @@ +# Ignore .htaccess (copy ht.access and create your own) +.htaccess + +# Ignoring composer.phar (because we don't want to push it to Github) composer.phar + +# Ignoring composer.lock (just because) composer.lock + +# Ignoring vendor dir (because files are installed using composer) vendor \ No newline at end of file diff --git a/.htaccess b/.htaccess index 952ded2a..7c5d88f8 100755 --- a/.htaccess +++ b/.htaccess @@ -1,3 +1,4 @@ +<<<<<<< HEAD Options +FollowSymLinks RewriteEngine on RewriteBase / @@ -7,6 +8,13 @@ RewriteRule ^(.*)$ http://%1/$1 [R=301,L] RewriteCond %{REQUEST_URI} !(/$|\.) RewriteRule (.*) %{REQUEST_URI}/ [R=301,L] +======= +# Mod rewrite +RewriteEngine On +RewriteBase /Zoff + +# Route all requests to index.php unless real file or folder +>>>>>>> Some changes RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule /(.*)$ /$1 [L] \ No newline at end of file +RewriteRule /(.*)$ /$1 [L] diff --git a/README.md b/README.md index 683899a4..b8c7d467 100755 --- a/README.md +++ b/README.md @@ -12,10 +12,24 @@ The project is currently under development and runs on http://zoff.no Install notes ============= +Composer +-------- + This projects uses composer. Install composer by typing: curl -sS https://getcomposer.org/installer | php After that, fetch project dependencies: - php composer.phar update \ No newline at end of file + php composer.phar update + +.htaccess +--------- + +We also use .htaccess to prettify the urls. To keep it easy to develop elsewhere, we have a stock ht.access file. Copy this and call it .htaccess. If you develop in a directory that is not the base in your webserver change + + RewriteBase / + +To + + RewriteBase /your-sub-directory \ No newline at end of file diff --git a/ht.access b/ht.access new file mode 100755 index 00000000..4d53c4aa --- /dev/null +++ b/ht.access @@ -0,0 +1,11 @@ +# Mod rewrite +RewriteEngine On +RewriteBase / + +# Route all requests to index.php unless real file or folder +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] + +# Disallow directory listing +Options -Indexes \ No newline at end of file