raulcastro/lawyer/master/.htaccess - Htaccess File

raulcastro/lawyer/master/.htaccess

RewriteEngine On

# Error Pages
ErrorDocument 401 /not-found.html
ErrorDocument 403 /not-found.html
ErrorDocument 404 /not-found.html
ErrorDocument 500 /not-found.html

# Prevent directory browsing
Options -Indexes +FollowSymLinks -MultiViews

# Canonical host
RewriteCond %{HTTP_HOST}    ^www.(.*)      [NC]
RewriteRule ^(.*)$          http://%1/$1    [L,R,NE]

#Needed
RewriteRule ^sitemap.xml$ sitemap.xml

# Rewrite Rules
# RewriteRule ^location/([0-9]+)/([A-Za-z0-9-]+)/$ /cover_category.php?location=$1
# RewriteRule ^company/([0-9]+)/([A-Za-z0-9-]+)/([0-9]+)/([A-Za-z0-9-]+)/$ /show_company.php?category=$1&company=$3
# RewriteRule ^company/([0-9]+)/([A-Za-z0-9-]+)/([0-9]+)/([A-Za-z0-9-]+)/([0-9]+)/([A-Za-z0-9-]+)/$ /show_company.php?category=$1&subcategory=$3&company=$5
# RewriteRule ^([0-9]+)/([A-Za-z0-9-]+)/$ /cover_category.php?category=$1
# RewriteRule ^events/([0-9]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([0-9]+)/([A-Za-z0-9-]+)/$ /show_company.php?belong_company=$1&company=$4
# RewriteRule ^events/$ /cover_events.php?category=$1

RewriteRule ^$ /index.php?lang=es
RewriteRule ^en/$ /index.php?lang=en
RewriteRule ^fr/$ /index.php?lang=fr
RewriteRule ^([A-Za-z0-9-]+)/$ /index.php?lang=es

# Espagnol
RewriteRule ^es/acerca-de-nosotros/$ /about-us.php?lang=es
RewriteRule ^es/vision/$ /vision.php?lang=es
RewriteRule ^es/areas-de-intervencion/$ /areas.php?lang=es
RewriteRule ^es/areas-de-intervencion/([A-Za-z0-9-]+)/$ /single-area.php?lang=es&area=$1
RewriteRule ^es/contacto/$ /contact.php?lang=es

# English
RewriteRule ^en/about-us/$ /about-us.php?lang=en
RewriteRule ^en/vision/$ /vision.php?lang=en
RewriteRule ^en/areas-of-intervention/$ /areas.php?lang=en
RewriteRule ^en/areas-of-intervention/([A-Za-z0-9-]+)/$ /single-area.php?lang=en&area=$1
RewriteRule ^en/contact/$ /contact.php?lang=en

# French
RewriteRule ^fr/a-propos-de-nous/$ /about-us.php?lang=fr
RewriteRule ^fr/vision/$ /vision.php?lang=fr
RewriteRule ^fr/domaines-dintervention/$ /areas.php?lang=fr
RewriteRule ^fr/domaines-dintervention/([A-Za-z0-9-]+)/$ /single-area.php?lang=fr&area=$1
RewriteRule ^fr/nous-contacter/$ /contact.php?lang=fr

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST

Comments

Apache