Welcome Guest, Not a member yet? Register   Sign In
.htaccess
#1

[eluser]-spy-[/eluser]
im just a beginner in web development, and im having a hard time removing the index.php
im using xampp..

im confuse with .htaccess..
i create this with a notepad and put it inside htdocs.. is it correct?

i also configure the httpd in apache...i read about that in wiki, but i everytime i click the link in my sample page, it will go to the localhost(xampp)..is there anything wrong?
#2

[eluser]Sarfaraz Momin[/eluser]
Check if your mod rewrite module is working.

Well this is my .htaccess for XAMPP installation
Code:
RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Good Day !!!
#3

[eluser]-spy-[/eluser]
how will i do that? im not familiar with this.. hope you can help me..
#4

[eluser]-spy-[/eluser]
im also working on windows..
#5

[eluser]nmweb[/eluser]
In your CI directory (so where the index.php is situated) you place a file named .htaccess with these contents:

<code>
RewriteEngine On

RewriteBase /{your CI directory}/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</code>

That's it. http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html for an explanation.
#6

[eluser]-spy-[/eluser]
i got erro 500, i read it on wiki, and follow the steps but nothing happened..
#7

[eluser]-spy-[/eluser]
i think i have something to do in httpd file.
in <Directory> section or
<Directory "/some/absolute/path/htdocs"> section..
i tried the steps in wiki..

i put the CI directory in the .htaccess
...
RewriteBase /{your CI directory}/
....
....

then error 500 appeared..

and when i removed it,
it will go to the local host..
i need your help badly..
#8

[eluser]Grahack[/eluser]
What C:\xampp\apache\logs\error.log says?
#9

[eluser]ejangi[/eluser]
Have a look in the httpd.conf file and make sure that mod_rewrite is being loaded. There should be a line that looks like:
Code:
LoadModule rewrite_module modules/mod_rewrite.so

and not:
Code:
#LoadModule rewrite_module modules/mod_rewrite.so
(notice the hash - which means the module is not being loaded)
#10

[eluser]-spy-[/eluser]
yes i remove the # sign.. but nothing happened..
everytime i click the link.. it will go to the localhost main page..
ther view i want to access(history.php) is under a subfolder..

views/profile/history.php

i there any effect?




Theme © iAndrew 2016 - Forum software by © MyBB