0

I am quite new to Apache and Webservers in general.

Anyway I basically copied a site ( love the design, and it was open source ) but can't get the .htaccess to work!

When I set Allowoveride to 'None' it runs fine, so I am assuming this is the fault of the .htaccess. I believe it is a URL rewrite file. On running it i get a 500. Below is the source:

Options -Indexes

RewriteEngine On
RewriteBase /

RedirectMatch 403 ^/?s/(.*)\.php$
RedirectMatch 403 ^/?chat/(.*)\.log$

RewriteRule ^/?d/(.*)$ /dl.php?p=$1 [NC,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*)$ /index.php?p=$1 [NC,L]

Anyone have any thoughts? The site follows a structure where the index and config is in /srv/http, but all the viewable files which the site actually display are in /srv/http/s.

EDIT: My error_log says this:

[Sun Aug 16 16:50:18.764852 2015] [core:alert] [pid 15976] [client ::1:44860] /srv/http/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
user24492
  • 37
  • 6
  • you might want to try enabling logging for both php and apache and check out what is written there. I would dare say that a 500 is mostly something code related, perhaps your script is called wrong. – Blizz Aug 16 '15 at 06:51
  • Alright yea my bad, just checked and added the error log. – user24492 Aug 16 '15 at 06:53
  • NEVERMIND - turns out i didn't have rewrite enabled in the config..., thanks for reminding me to check logs, your a lifesaver! – user24492 Aug 16 '15 at 06:54
  • 1
    Turns out I just hadn't had the rewrite function enabled. Oops! http://stackoverflow.com/questions/10144634/htaccess-invalid-command-rewriteengine-perhaps-misspelled-or-defined-by-a-m – user24492 Aug 16 '15 at 06:55

0 Answers0