CodeIgniter Forums
.htaccess issues help needed!!!! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: .htaccess issues help needed!!!! (/thread-17834.html)

Pages: 1 2 3


.htaccess issues help needed!!!! - El Forum - 04-17-2009

[eluser]learning_php[/eluser]
Hi,

I would be grateful if anyone could help I am using the following .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$l [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [NC,L]
</IfModule>

<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>

this allows my to use http://localhost/wedding-site/ to access the index page but when i click any link on the page it takes me to the xampp for windows page:

http://localhost/xampp/

link:

&lt;?= anchor('homepage/info','Information');?&gt;

Thanks


.htaccess issues help needed!!!! - El Forum - 04-17-2009

[eluser]TheFuzzy0ne[/eluser]
Hmmm. Have you secured XAMPP? IIRC, you need to run some basic configuration on it to get it working properly, such as setting the root account for MySQL and so on.


.htaccess issues help needed!!!! - El Forum - 04-17-2009

[eluser]pistolPete[/eluser]
Is the generated link correct?
Did you set
Code:
$config['base_url'] = 'http://localhost/wedding-site/';



.htaccess issues help needed!!!! - El Forum - 04-17-2009

[eluser]learning_php[/eluser]
Hi,

I double check the base url and it was set to "http://localhost/wedding-site";

Thanks


.htaccess issues help needed!!!! - El Forum - 04-17-2009

[eluser]TheFuzzy0ne[/eluser]
You need a trailing forward slash on there. Smile


.htaccess issues help needed!!!! - El Forum - 04-17-2009

[eluser]learning_php[/eluser]
I have added the trailing forward slash but it still does not work?


.htaccess issues help needed!!!! - El Forum - 04-17-2009

[eluser]rogierb[/eluser]
try RewriteBase /wedding-site/


.htaccess issues help needed!!!! - El Forum - 04-17-2009

[eluser]learning_php[/eluser]
Hi,

I tired adding RewriteBase /wedding-site/ to the file but i still get the same result?

Thanks


.htaccess issues help needed!!!! - El Forum - 04-17-2009

[eluser]Jelmer[/eluser]
Also change rules like this:
Code:
RewriteRule ^(.*)$ /index.php/$1 [NC,L]
To this:
Code:
RewriteRule ^(.*)$ /wedding-site/index.php/$1 [NC,L]



.htaccess issues help needed!!!! - El Forum - 04-17-2009

[eluser]rogierb[/eluser]
the RewriteRule ^(.*)$ /index.php/$1 [NC,L] has a slash, so maybe try RewriteRule ^(.*)$ index.php/$1 [NC,L]