Helladan/helladan_website/master/.htaccess - Htaccess File

Helladan/helladan_website/master/.htaccess

Options +FollowSymlinks
Options -Indexes
RewriteEngine on

RewriteCond %{HTTP_HOST} ^localhost$
ErrorDocument 404 http://localhost/helladan_website/404

RewriteCond %{HTTP_HOST} ^anthonygodard.forces-et-valeurs.fr$
ErrorDocument 404 http://anthonygodard.forces-et-valeurs.fr/404

RewriteRule ^$ index.php?page=home [NC,L,QSA]

# Rewrite Rule for post edition
RewriteRule ^postEdition-$ index.php?page=postEdition [NC,L,QSA]
RewriteRule ^postEdition-([0-9]+)(.php)*$ index.php?page=postEdition&post_id=$1 [NC,L,QSA]
# Rewrite Rule for post removal
RewriteRule ^postRemoval-$ index.php?page=postRemoval [NC,L,QSA]
RewriteRule ^postRemoval-([0-9]+)(.php)*$ index.php?page=postRemoval&post_id=$1 [NC,L,QSA]
# Rewrite Rule for article page
RewriteRule ^article-$ index.php?page=article [NC,L,QSA]
RewriteRule ^article-([a-z0-9-_]+)(.php)*$ index.php?page=article&post_id=$1 [NC,L,QSA]

# Rewrite Rule for qa edition
RewriteRule ^qaEdition-$ index.php?page=qaEdition [NC,L,QSA]
RewriteRule ^qaEdition-([0-9]+)(.php)*$ index.php?page=qaEdition&qa_id=$1 [NC,L,QSA]
# Rewrite Rule for qa removal
RewriteRule ^qaRemoval-$ index.php?page=qaRemoval [NC,L,QSA]
RewriteRule ^qaRemoval-([0-9]+)(.php)*$ index.php?page=qaRemoval&qa_id=$1 [NC,L,QSA]
# Rewrite Rule for qa illustration edition
RewriteRule ^qaIllustrationEdition-$ index.php?page=qaIllustrationEdition [NC,L,QSA]
RewriteRule ^qaIllustrationEdition-([0-9]+)(.php)*$ index.php?page=qaIllustrationEdition&qa_id=$1 [NC,L,QSA]

# Rewrite Rule for project edition
RewriteRule ^projectEdition-$ index.php?page=projectEdition [NC,L,QSA]
RewriteRule ^projectEdition-([0-9]+)(.php)*$ index.php?page=projectEdition&project_id=$1 [NC,L,QSA]
# Rewrite Rule for project removal
RewriteRule ^qaRemoval-$ index.php?page=projectRemoval [NC,L,QSA]
RewriteRule ^projectRemoval-([0-9]+)(.php)*$ index.php?page=projectRemoval&project_id=$1 [NC,L,QSA]
# Rewrite Rule for project image edition
RewriteRule ^projectImageEdition-$ index.php?page=projectImageEdition [NC,L,QSA]
RewriteRule ^projectImageEdition-([0-9]+)(.php)*$ index.php?page=projectImageEdition&project_id=$1 [NC,L,QSA]

# Rewrite Rule for page reader
RewriteRule ^pageReader-$ index.php?page=pageReader [NC,L,QSA]
RewriteRule ^pageReader-([a-z0-9-_]+)(.php)*$ index.php?page=pageReader&pageID=$1 [NC,L,QSA]
# Rewrite Rule for page edition
RewriteRule ^pageEdition-$ index.php?page=pageEdition [NC,L,QSA]
RewriteRule ^pageEdition-([0-9]+)(.php)*$ index.php?page=pageEdition&page_id=$1 [NC,L,QSA]
# Rewrite Rule for page removal
RewriteRule ^pageRemoval-$ index.php?page=pageRemoval [NC,L,QSA]
RewriteRule ^pageRemoval-([0-9]+)(.php)*$ index.php?page=pageRemoval&page_id=$1 [NC,L,QSA]

# Rewrite Rule for article page
RewriteRule ^article-$ index.php?page=article [NC,L,QSA]
RewriteRule ^article-([a-z0-9-_]+)(.php)*$ index.php?page=article&article=$1 [NC,L,QSA]

RewriteCond %{HTTP_HOST} ^localhost$
RewriteRule ^([a-zA-Z0-9_-/]+)(.php)*$ index.php?page=$1 [NC,L,QSA]

RewriteCond %{HTTP_HOST} ^(www.)*anthonygodard.forces-et-valeurs.fr$
RewriteRule ^([a-zA-Z0-9_-/]+).php$ index.php?page=$1 [NC,L,QSA] 

RewriteCond %{HTTP_HOST} ^(www.)*anthony-godard.pro$
RewriteRule ^([a-zA-Z0-9_-/]+).php$ index.php?page=$1 [NC,L,QSA]

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST

Comments

Apache