Welcome Guest, Not a member yet? Register   Sign In
Using static URL's
#7

[eluser]Sweepee[/eluser]
My projects (with my needs) works with this HTACCESS file:

Code:
Allow From All
RewriteEngine On
RewriteCond $1 !^(index\.php|css|js|images|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [L]

It's working now for these URL's:

/index goes to home/index
/contact goes to contact/index

But this doesn't work for /index.html and /contact.html...

How can I set this HTACCESS?

Don't I have to make a rule like:

"redirect every URL that ends on .html to index.php without that .html"

What do you think?

Also, that setting in config.php... I don't think it's helping my out, because of the comments in the config:

Code:
/*
|--------------------------------------------------------------------------
| URL suffix
|--------------------------------------------------------------------------
|
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
| For more information please see the user guide:
|
| http://ellislab.com/codeigniter/user-guide/general/urls.html
*/

$config['url_suffix'] = "html";

It's only adding a suffix to all GENERATED URL's in CodeIgniter. Can be wrong though! Four happy days of CodeIgniter experience by now. Smile


Messages In This Thread
Using static URL's - by El Forum - 03-30-2010, 03:04 PM
Using static URL's - by El Forum - 03-30-2010, 05:43 PM
Using static URL's - by El Forum - 03-31-2010, 01:05 AM
Using static URL's - by El Forum - 03-31-2010, 03:14 PM
Using static URL's - by El Forum - 03-31-2010, 04:26 PM
Using static URL's - by El Forum - 03-31-2010, 04:27 PM
Using static URL's - by El Forum - 03-31-2010, 04:50 PM
Using static URL's - by El Forum - 03-31-2010, 05:32 PM
Using static URL's - by El Forum - 03-31-2010, 05:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB