CodeIgniter Forums
htaccess problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: htaccess problem (/showthread.php?tid=28448)

Pages: 1 2


htaccess problem - El Forum - 03-11-2010

[eluser]ChristopherDosin[/eluser]
hey again

i`ve a little poblem with the htaccess file.

http://codeigniter.com/wiki/Dreamhost_.htaccess/

method 1 doesnt work.

if i take the secound method the url is correct, but my links doestn work.

and if i use method 1 and 2 the links are working but my css/js files doesnt load.

did i somethind wrong?

my url http://www.dosingo.com/

ps: i think now its working


htaccess problem - El Forum - 03-12-2010

[eluser]mohsin917[/eluser]
I don't know much about it.. but solution 3 is working..


htaccess problem - El Forum - 03-12-2010

[eluser]ChristopherDosin[/eluser]
with method 3, I still have the index.php/ in my url ...
and with method 2 i get a Internal Server Error
and with method 1 my files ( css/js etc ) doesnt load


htaccess problem - El Forum - 03-12-2010

[eluser]mohsin917[/eluser]
Bro, I use this

Code:
# Customized error messages.
ErrorDocument 404 /index.php


Options +FollowSymlinks

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on
  
  Rewriterule ^admin$    admin.php [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^admin/(.*)$ admin.php/$1 [L,QSA]
  
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L,QSA]
  
  
</IfModule>

Actually i have two files at root. Index.php and admin.php, So this code works for changing the urls.....

Now my site's root is www.example.com/myaccount
and at admin side.. www.example.com/admin/user_management


htaccess problem - El Forum - 03-12-2010

[eluser]ChristopherDosin[/eluser]
if i use this example i still have the index.php/ in my url ...
dont know why no method is working Sad


htaccess problem - El Forum - 03-12-2010

[eluser]mohsin917[/eluser]
are you using anchor function ?? for your links?


htaccess problem - El Forum - 03-12-2010

[eluser]ChristopherDosin[/eluser]
[quote author="mohsin917" date="1268413439"]are you using anchor function ?? for your links?[/quote]

yes i do
should i use a "normal" link tag?


htaccess problem - El Forum - 03-12-2010

[eluser]mohsin917[/eluser]
Try it with <a href=''> tag.... I was also having the same problem with anchor but not found how to solve it.. Undecided


htaccess problem - El Forum - 03-12-2010

[eluser]mohsin917[/eluser]
hay i get it...

replace this in your config.php file

Code:
$config['index_page'] = "admin.php";

to

Code:
$config['index_page'] = "admin";

replace it with same name which you are trying to use in htaccess..

then anchor becomes working..


htaccess problem - El Forum - 03-12-2010

[eluser]ChristopherDosin[/eluser]
great !

but my css/js/images files still doesnt load

the path is correct, but there`s no css file anymore.
could it be possible that the htaccess rewrite something wrong?