diff options
author | Mike Funk <mfunk@xulonpress.com> | 2012-02-23 20:52:23 +0100 |
---|---|---|
committer | Mike Funk <mfunk@xulonpress.com> | 2012-02-23 20:52:23 +0100 |
commit | 27a536dd3570f867ef807ab12391da032b32f09a (patch) | |
tree | 344b7dab21ea563e54567e428de3791c146e3ae3 /user_guide_src/source/general/urls.rst | |
parent | 8afb848fded8fbdfa24b72df7f067e960c83c0e8 (diff) | |
parent | e2675736f3a68b1f64e135d827f6a70e0ae892fb (diff) |
Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'user_guide_src/source/general/urls.rst')
-rw-r--r-- | user_guide_src/source/general/urls.rst | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/user_guide_src/source/general/urls.rst b/user_guide_src/source/general/urls.rst index 211537675..6b390b559 100644 --- a/user_guide_src/source/general/urls.rst +++ b/user_guide_src/source/general/urls.rst @@ -39,18 +39,22 @@ By default, the **index.php** file will be included in your URLs:: example.com/index.php/news/article/my_article -You can easily remove this file by using a .htaccess file with some -simple rules. Here is an example of such a file, using the "negative" -method in which everything is redirected except the specified items: +If your Apache server has mod_rewrite enabled, you can easily remove this +file by using a .htaccess file with some simple rules. Here is an example +of such a file, using the "negative" method in which everything is redirected +except the specified items: :: - RewriteEngine on - RewriteCond $1 !^(index\.php|images|robots\.txt) - RewriteRule ^(.*)$ /index.php/$1 [L] + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)$ index.php/$1 [L] -In the above example, any HTTP request other than those for index.php, -images, and robots.txt is treated as a request for your index.php file. +In the above example, any HTTP request other than those for existing +directories and existing files is treated as a request for your index.php file. + +.. note:: Note: These specific rules might not work for all server configurations. Adding a URL Suffix =================== |