Welcome Guest, Not a member yet? Register   Sign In
my .htaccess redirects me to localhost
#1

[eluser]-spy-[/eluser]
hi!
im having a hard time using .htaccess.. everytime i click the link from my sample page, it redirects me to the localhost..

here’s my .htaccess
Code:
RewriteEngine On
RewriteBase /

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

[eluser]Matthew Pennell[/eluser]
The last line is redirecting all requests to the root folder's index.php page. Either add the name of the folder where you're running CI:

Code:
RewriteRule ^(.*)$ /myapp/index.php/$1 [L]

or set up a VirtualHost in your Apache configuration file.
#3

[eluser]Unknown[/eluser]
Perhaps it is just a misconfiguration in config.php for the $config['base_url'] - Value?
#4

[eluser]Sarfaraz Momin[/eluser]
I think a slight change in the code should fix it.

Code:
RewriteEngine On
RewriteBase /

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

[eluser]-spy-[/eluser]
thanks..it's now working..n_n




Theme © iAndrew 2016 - Forum software by © MyBB