dear all,
i post my htaccess file , this is working fine , but i need efficient way , fine tune . hope your suggestions for speed up .
Options +FollowSymLinks
RewriteEngine On
# Internally rewrite search engine friendly static URL to dynamic filepath and query
RewriteRule ^sri-lanka-classifieds-([^/]+)\.html$ /browse.php?fatherID=$1 [L]
# Externally redirect client requests for old dynamic URLs to equivalent new static URLs
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /browse\.php\?fatherID=([^&]+)\ HTTP/
RewriteRule ^browse\.php$ [
sample.com...] [R=301,L]
# Internally rewrite search engine friendly static URL to dynamic filepath and query
RewriteRule ^sri-lanka-classifieds-([^/]+)-([^/]+)\.html$ /browse.php?fatherID=$1&pageNum=$2 [L]
# Externally redirect client requests for old dynamic URLs to equivalent new static URLs
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /browse\.php\?fatherID=([^&]+)&pageNum=([^&]+)\ HTTP/
RewriteRule ^browse\.php$ [
sample.com...] [R=301,L]
# Internally rewrite search engine friendly static URL to dynamic filepath and query
RewriteRule ^([^/]+)-([^/]+)-([^/]+)-([^/]+)\.html$ /detail.php?Title=$1&fatherID=$2&ListingID=$3&TypeID=$4 [L]
# Externally redirect client requests for old dynamic URLs to equivalent new static URLs
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /detail\.php\?Title=([^&]+)&fatherID=([^&]+)&ListingID=([^&]+)&TypeID=([^&]+)\ HTTP/
RewriteRule ^detail\.php$ [
sample.com...] [R=301,L]
# non www or index.php
RewriteCond %{THE_REQUEST} ^.*\/index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^sample\.com [nc]
RewriteRule (.*) [
sample.com...] [R=301,L]
RewriteCond %{HTTP_HOST} ^sample.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.sample.com$
RewriteRule ^links.php$ [
sample.com...] [R=301,L]
# if not found
ErrorDocument 404 /404.php
# 480 weeks
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=290304000, public"
</FilesMatch>
# 2 DAYS
<FilesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=172800, public, must-revalidate"
</FilesMatch>
# 2 HOURS
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</FilesMatch>
<IfModule mod_suphp.c>
suPHP_ConfigPath /home/danweem
<Files php.ini>
order allow,deny
deny from all
</Files>
</IfModule>