hiding index.php problem

try adding:

RewriteBase /webapp/

in htaccess and rewrite your mod_rewrite rules so they do not contain webapp directory.

how would one do this from a mac?

Use notepad++ to convert the line endings to the format of your choice.

will give it a try. i love the programmer who writes np++. Don Ho or whatever his internet name is haha

Good afternoon.

I too am using a Mac and experiencing this problem. I’m using NetBeans (7.3.1) IDE. Anyone know how to make this Mac<==>PC conversion in NetBeans? (or any other editor for that matter – perhaps TextWrangler or even vi !).

Thanks for any help.

Just a bit more info:

All my settings match Yii-User’s listed above. I’m on a Mac platform, running Mountain Lion OSX 8.4.1, NetBeans 7.3.1 IDE (7.2 is also available), MySQL, PHP 5.3.26, and the local Apache server (on the Mac).

Thanks again.

Mike K.

I figured out how to convert the DOS/PC file to UNIX/Mac (see below), but this did not correct the problem for me. I’m still seeing the index.php file in the URL and the server can’t find the page if index.php is not in the URL.




In a Terminal Window:


First:

cat -v file-name

(verify ^M at EOL if it's a DOS/PC file)


Second:


tr -d '\r' < .htaccess > .htaccessUNIX

(gave a different file name for target)


Third:

mv .htaccess .htaccessPC

(rename original)


Finally:

cp .htaccessUNIX .htaccess



So any other ideas on implementing this on Mac? I’m going to try posting this to an active server to see if there is a difference. Will report findings later.

m40684

Try with this .htaccess. I’m using it on W7 and XAMPP and works.




Options +FollowSymLinks

IndexIgnore */*


RewriteBase /


RewriteEngine on


# if a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d


# otherwise forward it to index.php

RewriteRule . index.php



Make sure, that you also configured your Apache Web server to AllowOverride All for your root directory. Because that is the one which will decide, what all parameters you can override in your .htaccess file