RewriteEngine On
Options -Indexes

RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteRule ^/$ index.php
RewriteRule ^$ index.php
RewriteRule ^404$ 404.php

RewriteRule ^css/style.css$ css/axioo.bali.php [L]

# HOME
RewriteRule ^index$ index.php
RewriteRule ^home$ index.php

RewriteRule ^callax/menupop$ _ajax/ajax_index.php?a=menupopfromstripes [L]


RewriteRule ^about$ about.php
RewriteRule ^contact$ contact.php
RewriteRule ^story/([-a-z0-9]+)$ story.php?url=$1
RewriteRule ^epic/([-a-z0-9]+)$ story.php?epic=$1

RewriteRule ^photography/weddings$ page.php?a=photography&b=weddings
RewriteRule ^photography/weddings/([0-9]+)$ page.php?a=photography&b=weddings&p=$1
RewriteRule ^photography/pre-weddings$ page.php?a=photography&b=pre-weddings
RewriteRule ^photography/pre-weddings/([0-9]+)$ page.php?a=photography&b=pre-weddings&p=$1
RewriteRule ^cinema$ page.php?a=cinema
RewriteRule ^cinema/([0-9]+)$ page.php?a=cinema&p=$1
RewriteRule ^cinematography$ page.php?a=cinema
RewriteRule ^cinematography/([0-9]+)$ page.php?a=cinema&p=$1
RewriteRule ^journal$ page.php?a=journal
RewriteRule ^journal/p/([0-9]+)$ page.php?a=journal&p=$1
RewriteRule ^journal/t/([-a-z0-9]+)$ page.php?a=journal&t=$1
RewriteRule ^talent/([0-9]+)$ talent.php?kode=$1
RewriteRule ^talent/([0-9]+)/([0-9]+)$ talent.php?kode=$1&p=$2

RewriteRule ^location/([-a-z0-9]+)$ page.php?a=location&t=$1
RewriteRule ^search/([-a-z0-9]+)$ page.php?a=search&t=$1

RewriteRule ^talent/([-a-z0-9]+)$ talent.php?kode_url=$1
RewriteRule ^talent/([-a-z0-9]+)/([0-9]+)$ talent.php?kode_url=$1&p=$2
RewriteRule ^([-a-z]+)$ talent.php?kode_url=$1

RewriteRule ^search$ search.php
RewriteRule ^search/(.*)/([0-9]+)$ search.php?key=$1&p=$2 [B]
RewriteRule ^search/(.*)$ search.php?key=$1 [B]

RewriteRule ^holiday$ holiday.php

RewriteRule ^/images/stories$ /beyondadminwords/files

#RewriteRule ^file/download/product/pdf/([-a-zA-Z0-9]+)/ file.php?a=product&b=pdf&asalan=$1

#RewriteRule ^explore-bali$ explore-bali.php

#RewriteRule ^facility$ facility.php
#RewriteRule ^facility/([-a-z0-9]+)$ facility.php?url=$1

#RewriteRule ^villas$ villas.php
#RewriteRule ^villas/([-a-z0-9]+)$ villas.php?url=$1

#RewriteRule ^gallery$ gallery.php
#RewriteRule ^gallery/([-a-z0-9]+)$ gallery.php?url=$1

#RewriteRule ^events$ events.php
#RewriteRule ^events/([-a-z0-9]+)$ events.php?url=$1

#RewriteRule ^reservation$ reservation.php
##RewriteRule ^reservation/book/([-a-z0-9]+)/([-a-z0-9]+)$ reservation.php?a=book&thedate=$1&thenite=$2
##RewriteRule ^reservation/book/([0-9a-zA-Z\-_.%]+)$ reservation.php?a=book&rk=$1
#RewriteRule ^reservation/book/units/([0-9a-zA-Z\-_.%]+)$ reservation.php?a=book&step=1&rk=$1
#RewriteRule ^reservation/book/contact/([0-9a-zA-Z\-_.%]+)$ reservation.php?a=book&step=2&rk=$1

##RewriteRule ^reservation/special-offers$ reservation.php?a=1
#RewriteRule ^reservation/special-offers$ reservation-special.php
#RewriteRule ^reservation/special-offers/book/units/([0-9a-zA-Z\-_.%]+)$ reservation-special.php?a=book&step=1&rk=$1
#RewriteRule ^reservation/special-offers/book/contact/([0-9a-zA-Z\-_.%]+)$ reservation-special.php?a=book&step=2&rk=$1

#RewriteRule ^reserve/step([0-9]+)/([0-9a-zA-Z\-_.%]+)$ /_ajax/reserve.php?a=calculatebook&b=1&step=$1&rk=$2
#RewriteRule ^reserve/special/step([0-9]+)/([0-9a-zA-Z\-_.%]+)$ /_ajax/reserve.php?a=calculatespecial&b=1&step=$1&rk=$2

#RewriteRule ^map$ map.php
#RewriteRule ^the-maha$ the-maha.php
#RewriteRule ^press$ press.php

#RewriteRule ^haha$ haha.php

RewriteRule ^gfx/captcha/([0-9]{10}).gif/captcha_order$ recaptcha/captcha.php

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 week"
ExpiresByType image/jpeg "access 1 week"
ExpiresByType image/gif "access 1 week"
ExpiresByType image/png "access 1 week"
ExpiresByType text/css "access 1 week"
ExpiresByType text/html "access 1 week"
ExpiresByType application/pdf "access 1 week"
ExpiresByType text/x-javascript "access 1 week"
ExpiresByType application/x-shockwave-flash "access 1 week"
ExpiresByType image/x-icon "access 1 week"
ExpiresDefault "access 1 week"
</IfModule>

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php72___lsphp .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
