diff options
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 =================== |