[apache] htaccess

Costas

Administrator
Staff member
reference
http://gist.github.com/ScottPhillips/1721489

JavaScript:
//.htaccess - folder free - source http://community.sitepoint.com/t/setting-rewritebase-automatically-as-the-current-directory/2141/6
<IfModule rewrite_module>
AcceptPathInfo On

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/?$1 [L]
</IfModule>

 
 
 

when I hit http://x.com/blog
JavaScript:
//the x.com/index.php 
<?php

var_dump($_GET);

outputs
array(1) { ["blog"]=> string(0) "" }

 

 


Building a basic router

http://medium.com/@dylanbr/building-a-basic-router-b43c17361f8b

ex.
http://example.com/this/is/the/route


JavaScript:
RewriteEngine On
RewriteRule ^(.*)$ index.php [NC,L]

 

 


Adding an Index.html Front Page to Forum



source - https://www.phpbb.com/community/viewtopic.php?p=13191070#p13191070

at the very top of the file on a line by itself, copy and paste this:

JavaScript:
DirectoryIndex home.html index.php

now, what will happen is that when somebody visits your site at http://yourdomain.com they will automatically see the home.php page instead of the index.php
 
Top