From ed477270cca24e91941d947c00370ee8712e5fac Mon Sep 17 00:00:00 2001 From: Repox Date: Tue, 22 Nov 2011 11:13:48 +0100 Subject: Altered the suggested mod_rewrite rules for removing index.php from URL to better fit the needs between CI routing and asset files. This suggestion addresses issue #684 --- user_guide_src/source/general/urls.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/urls.rst b/user_guide_src/source/general/urls.rst index 211537675..6618aeece 100644 --- a/user_guide_src/source/general/urls.rst +++ b/user_guide_src/source/general/urls.rst @@ -45,12 +45,13 @@ method in which everything is redirected except the specified items: :: - RewriteEngine on - RewriteCond $1 !^(index\.php|images|robots\.txt) + 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 index.php, existing +directories and existing files is treated as a request for your index.php file. Adding a URL Suffix =================== -- cgit v1.2.3-24-g4f1b From 1f9a40f2465ee135d4ed0292d51a1ed6571173f0 Mon Sep 17 00:00:00 2001 From: Repox Date: Tue, 22 Nov 2011 11:25:24 +0100 Subject: Altered the explenation of the rewrite rules to better fit the actual result. --- user_guide_src/source/general/urls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/general') diff --git a/user_guide_src/source/general/urls.rst b/user_guide_src/source/general/urls.rst index 6618aeece..3126fcf36 100644 --- a/user_guide_src/source/general/urls.rst +++ b/user_guide_src/source/general/urls.rst @@ -50,7 +50,7 @@ method in which everything is redirected except the specified items: RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] -In the above example, any HTTP request other than those for index.php, existing +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. Adding a URL Suffix -- cgit v1.2.3-24-g4f1b