Welcome Guest, Not a member yet? Register   Sign In
.htaccess issues help needed!!!!
#1

[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
#2

[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.
#3

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

[eluser]learning_php[/eluser]
Hi,

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

Thanks
#5

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

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

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

[eluser]learning_php[/eluser]
Hi,

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

Thanks
#9

[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]
#10

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




Theme © iAndrew 2016 - Forum software by © MyBB