Rhyvon
Rhyvon

Reputation: 87

Run .htaccess on cgi/fastcgi server?

I made a website for an sports club in the area. I always ran it on my own server (apache2) when building and testing it and use .htaccess to make some rewrites. Now the website is going live on their server, only problem is they're running on a cgi/fastcgi server...

I'm not that experienced with that kind of IT terms and modifications, so i hope you'll can help me or give me some advice. What is the best way to make the .htaccess work (and the whole website, which also includes php code)? At the moment the website gives an "(IIS 8.5 Detailed Error) HTTP Error 403.14 - Forbidden" error. Also their running PHP7...

Hope somebody can help me!! Thanks!!

.htaccess

Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /

# redirect while under construction
RewriteCond %{REMOTE_ADDR} !^my\.ip\.addr\.ess$
RewriteCond %{REQUEST_URI} !construction\.html
RewriteRule ^(.*)$ /construction.html [R=302,L]

# remove .html extensions from the URL
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]

# convert html to php without changing the extension
AddType application/x-httpd-php .htm .html

ErrorDocument 404 /errors/404.html

Upvotes: 1

Views: 1518

Answers (1)

Quentin
Quentin

Reputation: 943569

This has nothing to do with CGI or FastCGI.

.htaccess is an Apache HTTP specific means of configuring your HTTP server.

If you want to configure Microsoft Internet Information Server then you have to use the IIS configuration methods, not Apache configuration methods.

(You are trying to configure three completely different things in your Apache configuration file, so I'm not going to look up detailed instructions for the IIS equivalents of all of them).

Upvotes: 2

Related Questions