Welcome Guest, Not a member yet? Register   Sign In
link static html pages without creating extra contorllers, possible
#4

[eluser]Lima[/eluser]
if you are using .htaccess file, just add exception in that file

default .htaccess look like this (base on ci user guide)
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

if you want browser access aboutUs.html on root public_html just add the exception in .htaccess file
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|aboutUs\.html)
RewriteRule ^(.*)$ /index.php/$1 [L]

or put all static page on one directory under root public html, so you just add exception for that directory (ex: static)
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|static)
RewriteRule ^(.*)$ /index.php/$1 [L]

one more thing.
on html code you must use "/" so browser always call aboutUs.html from root directory.
Code:
<a href="/aboutUs.html">About Us</a>
or
<a href="&lt;?php echo base_url() ?&gt;aboutUs.html">About Us</a>
hope this help you.


Messages In This Thread
link static html pages without creating extra contorllers, possible - by El Forum - 03-18-2010, 04:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB