JamesB Posted December 6, 2014 Share Posted December 6, 2014 Hi there I'm getting a 500 Internal Server Error when using this .htaccess file: RewriteEngine onRewriteCond $1 !^(index.php|public|forum|robots.txt)RewriteRule ^(.*)$ /ukscifi/test.php [L] Any idea why this is happening? Link to comment Share on other sites More sharing options...
Ingolme Posted December 6, 2014 Share Posted December 6, 2014 500 means that there's a syntax error in the htaccess file. I think the $1 in your RewriteCond is probably the problem. $ signifies a backreference and is used as the second parameter after a regular expression. I'm not sure if RewriteCond uses backreferences or if it's just RewriteRule that does. Where did you find this code? Link to comment Share on other sites More sharing options...
JamesB Posted December 6, 2014 Author Share Posted December 6, 2014 Well I'm using this htaccess code at the moment which works. RewriteEngine onRewriteCond $1 !^(index.php|public|forum|robots.txt)RewriteRule ^(.*)$ /ukscifi/index.php/$1 [L] The code which doesn't work came from this code, as I was playing around with it trying to get anything else working. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now