Forum Moderators: phranque
I've recently added some php pages to my site. I also have SSI - which now doesn't work - I've had to change it to php includes - even on the html pages. I was quite happy using SSI.
Can someone look at my htaccess and tell me what I should have in it please?
Thanks
-----
AddType text/html .shtml .html
AddHandler server-parsed .shtml .html
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule ^(.*)$ [mysite.com...] [L,R=301]
AddHandler server-parsed .html
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
It may not be possible to mix SSI and PHP on your server, depending on how it's configured and whether you're allowed to change the configuration. That's not something I know a lot about, so i'll leave that part of the question for others. We have had some previous discussion of this in the WebmasterWorld PHP forum, and a search for those previous threads might prove helpful.
Jim
I will change my SSI to php includes.
Would I re-write
AddType text/html .shtml .html .php
AddHandler server-parsed .shtml .html
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule ^(.*)$ [mysite.com...] [L,R=301]
?
It suggested this makes it harder for the server. Is there any part of the code I should avoid?
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
Jim