Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: htaccess not working
PostPosted: Mon Dec 28, 2015 10:14 am 
Offline
Newbie

Joined: Mon Dec 28, 2015 9:40 am
Posts: 4
htaccess redirects not working, works on my local xampp installation. tried installing apache mods, but nothing seemed to help. what would be the easiest way to solve this?

also want everything else to work, deflation thingies etc.

my htaccess:

## 666 ##

ErrorDocument 404 /
ErrorDocument 403 /
ErrorDocument 500 /

AddDefaultCharset utf-8

Options -Indexes
Options All -Indexes


RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]


AddType application/x-httpd-php .form
AddType application/x-httpd-php .loader

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/php "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/loader "access 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE image/svg+xml
</IfModule>

<Files .htaccess>
order allow,deny
deny from all
</Files>


Top
   
 Post subject: Re: htaccess not working
PostPosted: Mon Dec 28, 2015 10:24 am 
Offline
Newbie

Joined: Mon Dec 28, 2015 9:40 am
Posts: 4
So i installed debian 8 and apache .. and I get my files working properly, apache core installed, files show up, php works, but htaccess redirects dont :evil: :shock:


Top
   
 Post subject: Re: htaccess not working
PostPosted: Mon Dec 28, 2015 11:43 am 
Offline
Newbie

Joined: Mon Dec 28, 2015 9:40 am
Posts: 4
Aah okay, had to put AllowOverride All in all 3 places in apache2.conf


Top
   
 Post subject: Re: htaccess not working
PostPosted: Mon Dec 28, 2015 12:30 pm 
Offline
Newbie

Joined: Mon Dec 28, 2015 9:40 am
Posts: 4
Oh and.. had to fix this part as well:

<IfModule rewrite_module>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
</IfModule>


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group