I have a problem with CodeIgniter .htaccess file and hope that somebody can help me! I don't know regular expressions or how to use the .htaccess, I'm very new with this things!
Benim Sorun:
Ben bu dosya yapısı (çoklu uygulama) var:
- application
- admin
- site
- system
- index.php
- admin.php
Ve bu. Htaccess (yani localhost üzerinde çalışıyor!)
Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
Ne yapmak istiyorum:
Access my web site (frontend) with http://www.mydomain.com/ And my admin (backend) as http://www.mydomain.com/admin/
Bu benim yerel sunucuda çalışıyor, neden bilmiyorum.
Birisi bana yardımcı olabilir umuyoruz.
UPDATE
Ben bu kullanarak çalışmak lazım:
RewriteEngine on
# If the user types "index.php" or "admin.php".
RewriteCond $1 !^(index\.php|admin\.php|images|robots\.txt)
# If the user types just "admin".
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^admin$ admin\.php [L,QSA]
# If the user enter in any admin section, like "admin/section".
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^admin\/(.*)$ admin\.php/$1 [L,QSA]
# If the user types any site section, like "site/section".
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php/$1 [L,QSA]
I http://www.mydomain.com/admin veya http://www.mydomain.com/admin/any-section erişebilirsiniz Bu şekilde (yani sayı kök dizininde "admin.php" için)
Ve ben http://www.mydomain.com/ veya http://www.mydomain.com/any-section erişebilirsiniz (bu sayı kök dizininde "index.php" için)
Yardımın için teşekkürler!