Welcome Guest, Not a member yet? Register   Sign In
Having issues removing that index.php. Tried all possible solutions with no luck :(
#11

[eluser]www.sblog.in[/eluser]
You can have a look at this http://www.sblog.in/2014-03-08-02-28-32/...odeigniter
#12

[eluser]hobartimus[/eluser]
[quote author="Tim Brownlaw" date="1398397399"]
Your htaccess file has to be in your document root.. The same folder as your index.php above your application folder and it's friends!
[/quote]

It is.


[quote author="Tim Brownlaw" date="1398397399"]
Also check in your /Applications/MAMP/conf/apache/httpd.conf that you have

<Directory <path>>
Options Indexes FollowSymLinks
AllowOverride All
</Directory>
[/quote]

I checked this and it shows "AllowOverride None", but in MAMP > Hosts > Extended, "FollowSymLinks" is checked.

It doesn't show a path though. It just looks like this…

Code:
<Directory />
    Options Indexes FollowSymLinks
    AllowOverride None
</Directory>
#13

[eluser]InsiteFX[/eluser]
Place any text at the very top of your .htaccess file and run your application, if you get a server 500 error then rewrite is not turned on.
#14

[eluser]hobartimus[/eluser]
Internal Server Error

Not sure if it matters, but "LoadModule rewrite_module modules/mod_rewrite.so" is not commented out.

Here's something else that I probably should have already mentioned. In httpd.conf it shows "DocumentRoot "/Applications/MAMP/htdocs", but in MAMP > Hosts > localhost, I have Document Root set to "/Users/myusername/Sites". Could that be the problem?
#15

[eluser]Tim Brownlaw[/eluser]
What you need to do is tell apache Where you have your folder(s) that contain your website files.
Keep in mind, apache needs to know where you have your folders setup.

( There are other ways to do this but this is the simplest )
"One way" is to create a new entry in your httpd.conf.

<Directory /Users/myusername/Sites>
Options Indexes FollowSymLinks
AllowOverride All
</Directory>

And make sure you restart your server ( which you do every time you make any changes to the "servers" files )!

Give that a fly and let us know what happens.

Also, Are you using virtualhosts?

Bottom line is, We need to be able to tell apache where your document root is for each site and the settings for it.

For instance in one of my virtual hosts files I have something like...

( I could put the above directory entry above in here but I never change it so it's simpler for myself to just put in the httpd.conf file )

<VirtualHost *:80>
ServerName wordpresstest.com
ServerAlias www.wordpresstest.com
DocumentRoot /home/wordpresstest/public_html
ErrorLog /home/wordpresstest/logs/error.log
</VirtualHost>

There's a ton of info on this if you look in Google... Without seeing exactly what you have currently setup, it's a little difficult to just give you "the answer".

But hopefully this will give you something to look at.

Cheers
Tim
#16

[eluser]hobartimus[/eluser]
[quote author="Tim Brownlaw" date="1398473031"]What you need to do is tell apache Where you have your folder(s) that contain your website files.
Keep in mind, apache needs to know where you have your folders setup.
[/quote]
OK, I thought MAMP was taking care of this for me I set the document root.

[quote author="Tim Brownlaw" date="1398473031"]( There are other ways to do this but this is the simplest )
"One way" is to create a new entry in your httpd.conf.

<Directory /Users/myusername/Sites>
Options Indexes FollowSymLinks
AllowOverride All
</Directory>

And make sure you restart your server ( which you do every time you make any changes to the "servers" files )!
[/quote]
Tried this. Didn't fix anything.

[quote author="Tim Brownlaw" date="1398473031"]Also, Are you using virtualhosts?
[/quote]
Just using MAMPs default localhost, but changed the document root to my 'Sites' folder.

I don't think I'm going to sweat this too much since it all works fine on my live web server. Thanks for all your help though.
#17

[eluser]Tim Brownlaw[/eluser]
Hi,

I've just had a re-read over this issue, as it should be simple to fix!

I noticed that you've mentioned the .htaccess file in the applications folder as being the one you've been changing....

It would have just had deny all in it.

Have you tried creating ( as there is not one by default ) in your main folder above the application folder... The same folder where you're lonely index.php file is living... As this is the index.php file the htaccess file is wanting to use.

So try creating a new .httaccess file with the settings you originally had and save it above the application folder/system folder etc...

I'm guessing you had it in the wrong location.

But if it's running happily on your live webserver I could be right off the mark on this one!
What that suggests is ( and I'm about to be glaringly obvious here ) there's something different between your live server and your MAMP setup...

So the only things you really need to make this work ( on a good day ) is have mod_rewrite active - and the correct htaccess file in the correct location... and it should ( famous last words... ) Just Work!

Cheers
Tim

#18

[eluser]hobartimus[/eluser]
Nope, I have .htaccess in the document root along with index.php. I believe BaconJuice, who started this thread, mentioned having it in the application folder.

Thanks,
Howard
#19

[eluser]InsiteFX[/eluser]
Try this one:
Code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]  


<Files "index.php">
AcceptPathInfo On
</Files>  
</IfModule>

<IfModule !mod_rewrite.c>

ErrorDocument 404 /index.php
</IfModule>


//and config vars like:

$config['base_url'] = '';
$config['index_page'] = '';
#20

[eluser]hobartimus[/eluser]
Thanks, but like I said previously, I’m going to sweat this too much. The .htaccess provide by ahmad saad here is working fine with my MAMP install. I was just trying to figure out why this works, but not the standard issue version provided in the EE docs.

My last post was just a response to Tim Brownlaw comment about .htaccess location.




Theme © iAndrew 2016 - Forum software by © MyBB