Got the initial htaccess code from the wiki working great. My CI site currently resides in a subdirectory on the main site - my .htaccess file lives in that directory. so:
www.mysite.com/subdirectory/index.php/home/category/clothing
becomes
www.mysite.com/subdirectory/home/category/clothing
however, I want the above url to become this:
www.mysite.com/subdirectory/clothing.php
basically take the controller “home” and “category” out of the url.
i also want the ability to add another uri and maintain the flow, for example:
www.mysite.com/subdirectory/home/category/clothing/mens
becomes
www.mysite.com/subdirectory/clothing/mens.php
This is my .htaccess file right now (standard from the wiki i think):
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /onlinecatalogs/
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#‘system’ can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn’t true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don’t have mod_rewrite installed, all 404’s
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
</IfModule>
Any help would be greatly appreciated! ![]()
