Welcome Guest, Not a member yet? Register   Sign In
htaccess, localhost, linux problem
#1

[eluser]nertos[/eluser]
Hi,

how can I with url

http://127.0.0.1/~nertos/CATALOG/index.p.../parameter

do

http://127.0.0.1/function/parameter

I try many alternative with htaccess and vhost, but it still doesn't work;/

Any ides?
#2

[eluser]Nick_MyShuitings[/eluser]
What distro of linux are you using? I fought for a few days setting up my Ubuntu 10.04 box so I might be able to help if that is the distro.
#3

[eluser]nertos[/eluser]
@Nick_MyShitings
I have ArchLinux
#4

[eluser]Nick_MyShuitings[/eluser]
Gick... that I am not familiar with. However, in my fight with Ubuntu I realized it had about 0% to do with Codeigniter and everything to do with my distro and its LAMP stack... so the tuts for your particular distro would be your best bet.

Good luck.
#5

[eluser]Bart v B[/eluser]
Same as ubuntu i think..

First: sudo a2enmod rewrite
Then: sudo /etc/init.d/apache2 restart

Now it should work. Wink
#6

[eluser]nertos[/eluser]
I need some examplem, because I try everything and it doesn't work.
#7

[eluser]Bart v B[/eluser]
It should be /controller/method/segments/

First enable modrewrite.
The .htaccess file looks link this:
Code:
RewriteEngine On
    RewriteBase /
    
    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

Just put it in your document_root.




Theme © iAndrew 2016 - Forum software by © MyBB