Options -MultiViews
DirectoryIndex index.php

#php_value display_errors On

AddCharset UTF-8 .html
#AddHandler application/x-httpd-php-5-cgi .php
#AddHandler x-httpd-php .php
#AddType text/html php


RewriteEngine On

RewriteBase /

RewriteRule ^help/(.*)/(.*).html$ help.php?section=$1&subsection=$2&%{QUERY_STRING} [L]
RewriteRule ^help/(.*).html$ help.php?section=$1&%{QUERY_STRING} [L]

RewriteRule ^section/(.*).html$ structure.php?section=$1&%{QUERY_STRING} [L]

RewriteRule ^page/(.*).html$ pages.php?id=$1&%{QUERY_STRING} [L]

RewriteRule ^testimonials/page-(.*).html$ guestbook.php?page=$1&%{QUERY_STRING} [L]
RewriteRule ^testimonials/index.html$ guestbook.php?%{QUERY_STRING} [L]
RewriteRule ^testimonials-index.html$ testimonials/index.html [R]
RewriteRule ^create-a-flyer/garage-sale.html$ structure.php?section=create-a-flyer&spage=1&%{QUERY_STRING} [L]
RewriteRule ^create-a-flyer/moving-sale.html$ structure.php?section=create-a-flyer&spage=2&%{QUERY_STRING} [L]
RewriteRule ^create-a-flyer/yard-sale.html$ structure.php?section=create-a-flyer&spage=3&%{QUERY_STRING} [L]
RewriteRule ^create-a-flyer.html$ create-a-flyer/moving-sale.html [L]
RewriteRule ^testimonials/added.html$ guestbook.php?added=true&%{QUERY_STRING} [L]
RewriteRule ^testimonials/(.*).html$ guestbook.php?news=$1&%{QUERY_STRING} [L]
RewriteRule ^testimonials/$ guestbook.php?%{QUERY_STRING} [L]
RewriteRule ^testimonials.html$ guestbook.php?%{QUERY_STRING} [L]

RewriteRule ^movers/profile/(.*)/(.*)_([0-9]+).html$ profiles.php?type=movers&profile=$1&section=$2&page=$3&%{QUERY_STRING} [L]
RewriteRule ^movers/profile/(.*)/(.*).html$ profiles.php?type=movers&profile=$1&section=$2&%{QUERY_STRING} [L]
RewriteRule ^movers/profile/(.*).html$ profiles.php?type=movers&profile=$1&%{QUERY_STRING} [L]
RewriteRule ^movers/profile/(.*)/$ profiles.php?type=movers&profile=$1&%{QUERY_STRING} [L]
RewriteRule ^movers/profile/(.*)$ movers/profile/$1/ [R,L]


RewriteRule ^login.html$ members.php?login&%{QUERY_STRING} [L]
RewriteRule ^logout.html$ members.php?logout&%{QUERY_STRING} [L]
#RewriteRule ^recovery.html$ members.php?userpage&%{QUERY_STRING} [L]
#RewriteRule ^userpage.html$ members.php?userpage&%{QUERY_STRING} [L]
RewriteRule ^recovery.html$ structure.php?section=recovery&%{QUERY_STRING} [L]
RewriteRule ^userpage.html$ structure.php?section=userpage&%{QUERY_STRING} [L]


RewriteRule ^index.html$ index.php?%{QUERY_STRING} [L]
RewriteRule ^pdf/show/([A-Za-z0-9_-]+).pdf$ pdf/main.php?yourFlyer=$1&download=0&%{QUERY_STRING} [L]
RewriteRule ^pdf/download/([A-Za-z0-9_-]+).pdf$ pdf/main.php?yourFlyer=$1&download=1&%{QUERY_STRING} [L]

# all searchs
#RewriteRule ^last-minute/page-(.*).html$ structure.php?section=last-minute&page=$1&%{QUERY_STRING} [L]
#RewriteRule ^last-minute.html$ structure.php?section=last-minute&%{QUERY_STRING} [L]

#RewriteRule ^storage/page-(.*).html$ structure.php?section=last-minute&page=$1&%{QUERY_STRING} [L]
#RewriteCond %{QUERY_STRING} !^$
#RewriteRule ^storage.html$ structure.php?section=last-minute&%{QUERY_STRING} [L]
#RewriteRule ^storage.html$ structure.php?section=storage&%{QUERY_STRING} [L]

#RewriteRule ^commercial-moving/page-(.*).html$ structure.php?section=last-minute&page=$1&%{QUERY_STRING} [L]
#RewriteCond %{QUERY_STRING} !^$
#RewriteRule ^commercial-moving.html$ structure.php?section=last-minute&%{QUERY_STRING} [L]
#RewriteRule ^commercial-moving.html$ structure.php?section=commercial-moving&%{QUERY_STRING} [L]

#RewriteRule ^long-distance-interstate-moving/page-(.*).html$ structure.php?section=last-minute&page=$1&%{QUERY_STRING} [L]
#RewriteCond %{QUERY_STRING} !^$
#RewriteRule ^long-distance-interstate-moving.html$ structure.php?section=last-minute&%{QUERY_STRING} [L]
#RewriteRule ^long-distance-interstate-moving.html$ structure.php?section=long-distance-interstate-moving&%{QUERY_STRING} [L]

#RewriteRule ^rent-a-truck/page-(.*).html$ structure.php?section=last-minute&page=$1&%{QUERY_STRING} [L]
#RewriteCond %{QUERY_STRING} !^$
#RewriteRule ^rent-a-truck.html$ structure.php?section=last-minute&%{QUERY_STRING} [L]
#RewriteRule ^rent-a-truck.html$ structure.php?section=rent-a-truck&%{QUERY_STRING} [L]

#RewriteRule ^piano-moving/page-(.*).html$ structure.php?section=last-minute&page=$1&%{QUERY_STRING} [L]
#RewriteCond %{QUERY_STRING} !^$
#RewriteRule ^piano-moving.html$ structure.php?section=last-minute&%{QUERY_STRING} [L]
#RewriteRule ^piano-moving.html$ structure.php?section=piano-moving&%{QUERY_STRING} [L]

#RewriteRule ^moving-supplies/page-(.*).html$ structure.php?section=last-minute&page=$1&%{QUERY_STRING} [L]
#RewriteCond %{QUERY_STRING} !^$
#RewriteRule ^moving-supplies.html$ structure.php?section=last-minute&%{QUERY_STRING} [L]
#RewriteRule ^moving-supplies.html$ structure.php?section=moving-supplies&%{QUERY_STRING} [L]

#RewriteRule ^moving-boxes/page-(.*).html$ structure.php?section=last-minute&page=$1&%{QUERY_STRING} [L]
#RewriteCond %{QUERY_STRING} !^$
#RewriteRule ^moving-boxes.html$ structure.php?section=last-minute&%{QUERY_STRING} [L]
#RewriteRule ^moving-boxes.html$ structure.php?section=moving-boxes&%{QUERY_STRING} [L]

#RewriteRule ^moving-blankets/page-(.*).html$ structure.php?section=last-minute&page=$1&%{QUERY_STRING} [L]
#RewriteCond %{QUERY_STRING} !^$
#RewriteRule ^moving-blankets.html$ structure.php?section=last-minute&%{QUERY_STRING} [L]
#RewriteRule ^moving-blankets.html$ structure.php?section=moving-blankets&%{QUERY_STRING} [L]
#\ end all searchs

RewriteRule ^message/([0-9]+).html$ message.php?order=$1&%{QUERY_STRING} [L]
RewriteRule ^message/([0-9]+)-([0-9]+).html$ message.php?order=$1&bid=$2&%{QUERY_STRING} [L]
RewriteRule ^message/([A-Za-z0-9_-]+).html$ message.php?sess=$1&%{QUERY_STRING} [L]
RewriteRule ^([A-Za-z0-9_-]+)/page-([0-9]+).html$ structure.php?section=$1&page=$2&%{QUERY_STRING} [L]
RewriteRule ^([A-Za-z0-9_-]+)/order-([0-9]+).html$ structure.php?section=$1&order=$2&%{QUERY_STRING} [L]
RewriteRule ^([A-Za-z0-9_-]+)/done-([0-9]+)_([0-9]+)_([0-9]+).html$ structure.php?section=$1&cur=$2&sub=$3&id=$4&%{QUERY_STRING} [L]
RewriteRule ^([A-Za-z0-9_-]+)/done-([0-9]+)-([0-9]+)-([0-9]+).html$ structure.php?section=$1&cur=$2&sub=$3&id=$4&myevents&%{QUERY_STRING} [L]
RewriteRule ^([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+).html$ structure.php?section=$1&spage=$2&%{QUERY_STRING} [L]
RewriteRule ^([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)/([0-9]+).html$ structure.php?section=$1&spage=$2&cur=$3&%{QUERY_STRING} [L]
RewriteRule ^([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)/([0-9]+)_([0-9]+).html$ structure.php?section=$1&spage=$2&cur=$3&orders=$4&%{QUERY_STRING} [L]
RewriteRule ^([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)/([0-9]+)-([0-9]+).html$ structure.php?section=$1&spage=$2&cur=$3&num=$4&%{QUERY_STRING} [L]
RewriteRule ^([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)/([0-9]+)-([0-9]+)-([0-9]+).html$ structure.php?section=$1&spage=$2&cur=$3&num=$4&orders=$5&%{QUERY_STRING} [L]
RewriteRule ^([A-Za-z0-9_-]+).html$ structure.php?section=$1&%{QUERY_STRING} [L]
AddHandler application/x-httpd-ea-php56 .php
