/    Sign up×
Community /Pin to ProfileBookmark

htaccess problem

Hi,

I am using the following htaccess file and it works fine when I run it local on my machine but when I change it to production (put a # on the line under and and remove it from line under production) and upload it to my hosting server it fails with error 500

Any ideaS?

[CODE]
# Set a new php timeout for XMLFeed
php_value max_execution_time 800

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{ENV:REDIRECT_STATUS} ^$
# Dev
#RewriteCond %{HTTP_HOST}/websites/livesite/index.php ^(1)27.0.0.1(/websites/livesite/index.php)$ [NC,OR]
# Pre Production
#RewriteCond %{HTTP_HOST}/index.php ^(www.)?example.com(/index.php)$ [NC]
# Production
RewriteCond %{HTTP_HOST}/index.php ^(www.)livesite.co.uk(/index.php)$ [NC]
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule !^.+.(gif|jpe?g|png|css|js)$ %2 [QSA,L]

#AuthType basic
#AuthUserFile “.htpasswd”
#AuthGroupFile /dev/null
#AuthName “Secure directory”
#Require valid-user
[/CODE]

Thanks
k0r54

to post a comment
Full-stack Developer

2 Comments(s)

Copy linkTweet thisAlerts:
@k0r54authorNov 03.2009 — Hey,

I have found out that my host is running php in cgi mode and not apache. Does anyone know how to get this to work in cgi mode?
Copy linkTweet thisAlerts:
@k0r54authorNov 03.2009 — solved - wasn't a htaccess file problem. It was down to php5 hiding my errors.
×

Success!

Help @k0r54 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...