Did you try adding something like this? RewriteBase /home/net/example/html/cake1.2/
On Sat, Nov 1, 2008 at 12:06 AM, Todd M <[EMAIL PROTECTED]> wrote: > > Ok, so I read up some more on htaccess, so I went back to the original > htaccess file that was in the cake_install_dir > I should point out that I'm on a shared web server. > > I found some hints on debugging on the web so here are my > modified .htaccess > Mostly added the the [R] where the [L] was. This was for debugging so > the url would be in the address bar when it failed > > in cake1.2 directory > <IfModule mod_rewrite.c> > RewriteEngine on > RewriteRule ^$ app/webroot/ [R] > RewriteRule (.*) app/webroot/$1 [R] > </IfModule> > > for apps directory > <IfModule mod_rewrite.c> > RewriteEngine on > RewriteRule ^$ webroot/ [R] > RewriteRule (.*) webroot/$1 [R] > </IfModule> > > for webroot directory > <IfModule mod_rewrite.c> > RewriteEngine On > RewriteCond %{REQUEST_FILENAME} !-d > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond %{REQUEST_URI} !^index.php > RewriteRule ^(.*)$ index.php?url=$1 [R] > </IfModule> > > > I did add another RewriteCond in the webroot .htaccess. I also > modified the webroot's index.php to just an if-else looking at the url > <?php > if (isset($_GET['url'])){ > echo 'You are here and url = ' . $_GET['url']; > } > else > { > echo ' No url seen '; > } > echo 'BLAH'; > ?> > > So what I see works and doesn't work. > http://www.example.net/cake1.2/app/webroot/foo.html (just a hello > world html) > http://www.example.net/cake1.2/app/webroot/index.php > http://www.example.net/cake1.2/app/webroot/index.php?url=posts > > What doesn't work is > http://www.example.net/cake1.2/posts > http://www.example.net/cake1.2/app/posts > http://www.example.net/cake1.2/app/webroot/posts > > Looking at the last one http://www.example.com/cake1.2/app/webroot/posts. > Because I put the [R] flags I see this in the address bar of the > failed attempt page > > http://www.example.net/home/net/example/html/cake1.2/app/webroot/index.php?url=posts > > So I'm thinking the problem is because I'm on a shared web server. But > thats just a hunch > > > > > > > On Oct 31, 3:42 am, Anupom <[EMAIL PROTECTED]> wrote: > > Hi there, > > > > Can you please share your modified .htaccess file that you have inside > your > > cake1.2 directory? I guess you have other .htaccess files inside your > root > > or html directory? Can you tell us what's written inside those as well? > > > > So my questions are if the .htaccess is necessary? good practice? > > > > > > > > .htaccess is necessary for pretty URLs and is certainly a good thing to > have > > :) You can though setup your cake to not to use .htaccess. > > > > Also please check if apache rewrite module is turned on in your web > server. > > > > Thanks. > > > > > > > > On Fri, Oct 31, 2008 at 9:40 AM, Todd M <[EMAIL PROTECTED]> wrote: > > > > > I'm finding problems with what I believe is with .htaccess in the > > > cake_install_directory. > > > > > My current web server only allows the /html directory as a HTML root. > > > To reduce complexity, I thought it would be good to start with > > > untaring the CakePHP in that directory. > > > > > so my directory appears something like this > > > > > /html > > > /cake1.2 > > > /app > > > /cake > > > /docs > > > /vendors > > > /foobar > > > > > I've noticed in the past if I wanted to look at an html file in foobar > > > I had to usehttp://www.example.com/foobar > > > > > So I'm at step 4 in the documentation. I've confirmed with the web > > > server that has AllowOverride is set to All. > > > > > It seems that I can't do > > >http://www.example.com/cake1.2 > > >http://www.example.com/cake1.2/index.php > > > or even > > >http://www.example.com/cake1.2/foo.html > > > > > The foo.html is just a hello world html file. > > > > > What I found is if I remove the .htaccess file I get a nice CakePHP > > > link telling my salt needs to be updated and that theres no connection > > > to DB. > > > > > So I went farther in the tutorial, I successfully linked DB & changed > > > salt word. Checked thehttp://www.example.com/cake1.2and everything > > > looks fine, including DB is connected and no salt warning. > > > > > I did do a google search both here and the internet. I did find > > > something about adding a Rewritebase line to all 3 .htaccess, but not > > > sure if I did that correctly. When I changed that, it seemed to just > > > go to a blank webpage. No errors or anything. > > > > > So my questions are if the .htaccess is necessary? good practice? > > > > -- > > Anupom Syamhttp://syamantics.com/ > > > > -- Anupom Syam http://syamantics.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---