[eluser]Unknown[/eluser]
Hi
I'm trying to code my first Codeigniter 1.7.2 application and have run into a weird problem. I've created a view which displays some relative urls like this
Code:
home/display_topic/1
I've checked using the browser's "page source" command that the URL's are OK and as above.
However, when I mouse over a link I get
Code:
http://localhost/wccs/home/display_forum/home/display_topic/1
appearing in the status bar of Firefox and clicking on it Firefox tries to "take me" to this incorrect URL.
I have a separate view that works fine with it's anchor links being correctly displayed in page source and in Firefox.
As I try and click around the site the URL's go crazy getting longer and longer like this
Code:
http://localhost/wccs/home/display_forum/home/display_topic/home/display_forum/home/display_forum/home/display_forum/2
Could it have anything to do with my .htaccess file which is as follows...
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wccs/index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /wccs/index.php
</IfModule>
I have also tried the htaccess from
Code:
http://codeigniter.com/wiki/mod_rewrite/
which I've changed to reflect my setup as follows...
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wccs
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
But the problem doesn't seem to be here. The problem is the same in Internet Explorer 8 as well as Firefox.
Thanks for your help