I am using a mod like this for the htaccess forum at
htaccesselite.com, where instead of
http://www.htaccesselite.com/htaccess/index.php the url is
http://www.htaccesselite.com/htaccess/htaccess-vc1.html
and for
http://www.htaccesselite.com/htaccess/viewtopic.php?t=5 its
http://www.htaccesselite.com/htaccess/caching-using-mod-expires-with-expires-vt5.html
This rewrites internally all .html files to .php
Code:
RewriteEngine On
RewriteBase /
RewriteRule (.*)\.html$ $1.php [L,T=application/x-httpd-php]
Forcing any files to be a certain type of file:
Code:
<Files index.php>
ForceType application/x-httpd-php
</Files>
Name php files .html
Code:
AddType application/x-httpd-php .html
If using phpbb:
Remove SID for guestsphpBB SEO mod rewritesGives you an htaccess like this-
Code:
RewriteEngine On
RewriteBase /
RewriteRule ^s/(.*)\.pl$ /cgi-bin/$1.php [L]
# FORUMS PAGES
########################
# FORUM PROTECTION RULE
RewriteRule ^htaccess/.+/([^/]+\.html)$ /htaccess/index.php [R=301,L]
# CATEGORIES
RewriteRule ^htaccess/.+-vc([0-9]+)\.html$ /htaccess/index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^htaccess/.+-vf([0-9]+)-([0-9]+)\.html$ /htaccess/viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^htaccess/.+-vf([0-9]+)\.html$ /htaccess/viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^htaccess/.+-vt([0-9]+)-([0-9]+)\.html$ /htaccess/viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^htaccess/.+-vt([0-9]+)\.html$ /htaccess/viewtopic.php?t=$1 [QSA,L]
# POST
RewriteRule ^htaccess/post([0-9]+)\.html$ /htaccess/viewtopic.php?p=$1 [QSA,L]
#PROFILES
RewriteRule ^htaccess/member([0-9]+)\.html$ /htaccess/profile.php?mode=viewprofile&u=$1 [QSA,L]
.htaccess to ADD .php file extensions .htaccess / Scheduled Jobs
html to php