Welcome Guest, Not a member yet? Register   Sign In
Problem removing index.php from url
#11

[eluser]Ram2810[/eluser]
i installed mod_rewrite

.htaccess code is as follows

Code:
RewriteEngine On
RewriteCond $1 !^(index\.php|assets|css|images|js|javascript|robots\.txt|favicon\.ico|license.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

removed index.php from config

I have my project in my local htdocs folder with the same heirarchy a index.php file of wamp server is present.
Inside my project folder i am having projects index.php file

By doing all the above i said when i type url without index.php it is being redirected to wamp severs index .php file ........ this is not working pls do help me out
#12

[eluser]rogierb[/eluser]
Try:

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

Or change the RewriteBase to /projects/
#13

[eluser]Nick Husher[/eluser]
[quote author="wiredesignz" date="1253210934"]Server 500 errors indicate mod_rewrite is not installed.[/quote]

Not necessarily true. Disallowed .htaccess directives can trigger a 500 error. Running the pre-installed OS X Apache server, I had to specifically allow overrides for my home directory. I have this in my httpd configs:

Code:
<Directory "/Users/nhusher/Sites/">
    Options Indexes MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
#14

[eluser]Ram2810[/eluser]
Thank you
rogierb

for your .htaccess suggestion it did worked ........ i dont know how this will when i move project files to main server ......... i am still not able to understand .htaccess file can any one suggest me tutorials or notes for knowing .htaccess and directory writing better so that i can go on my own next time around....

thank you
#15

[eluser]bretticus[/eluser]
[quote author="Ram2810" date="1253216169"] i am still not able to understand .htaccess file can any one suggest me tutorials or notes for knowing[/quote]

.htaccess is just a file you put in a given folder to modify the apache config for just that folder (it is better to modify the apache config but most often you do not have access to it.)

mod_rewrite is a module that is commonly included in apache installs to alter or rewrite the url that was submitted (in your case you needed http://localhost/lotus_ci/{anything} rewritten to http://localhost/lotus_ci/index.php/{anything}.

Here's an in-depth tutorial covering mod_rewrite for apache.
#16

[eluser]Nick Husher[/eluser]
Not to be too intimidating, but htaccess files are considered one of the major pieces of "black magic" in Apache. There are plenty of tutorials online for getting basic stuff done, but the masters of the htaccess are all gaunt old men clad in dark flowing robes that spend their days deep in the server catacombs. They learned their mastery the hard way: trial and error. Most of them also know how to write a sendmail.cf from scratch.
#17

[eluser]Ram2810[/eluser]
Now there is new problem menu links to other pages are not working on remote server.

following is the error for a url .... http://lotustravelsindia.com/test/lotus_ci/home

Code:
Not Found

The requested URL /lotus_ci/index.php/home was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at lotustravelsindia.com Port 80
#18

[eluser]saidbakr[/eluser]
I have the same problem too!




Theme © iAndrew 2016 - Forum software by © MyBB