As a follow up question, I'm not sure if this is an htaccess question
or a configuration setting.
Something I forgot to mention is that with some htaccess tweaks I did
reach a point in getting this URL working (http://www.mysite.com/
subdirectory/pages/about-us)
So my main question is how do you get CakePHP to create links that do
not include the index.php subdirectory?
On Jun 17, 4:27 pm, Andrew grievea...@yahoo.com wrote:
Hello,
I recently installed cakephp in a subdirectory directly off the root
directory. To get this working I used the htaccess settings in
Appendix 1 below. However I do have a problem I cannot figure out how
to fix. I've been trying to fix it for a few days now and I have not
been able to find instructions on the Interwebs to get this working.
To get my pretty urls working I have the htaccess files in the right
place and I have made sure my App.baseUrl setting in core.php is
commented out.
My current problem is that at the moment the URLs that are created
are:http://www.mysite.com/subdirectory/index.php/pages/about-us
But for SEO purposes I would prefer them to
be:http://www.mysite.com/subdirectory/pages/about-us
Appendix 1.
My HTaccess File is placed in subdirectory
IfModule mod_rewrite.c
RewriteEngine on
RewriteRule ^subdir$ subdir/app/webroot/ [L]
RewriteRule ^subdir/(.*) subdir/app/webroot/$1 [L]
/IfModule
This HTaccess file is placed in subdirectory/app
IfModule mod_rewrite.c
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
/IfModule
And this HTaccess file is placed in subdirectory/app/webroot
IfModule mod_rewrite.c
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^subdir/(.*)$ /subdir/app/webroot/index.php?url=$1
[QSA,L]
/IfModule
p.s. I cannot change httpd.conf because of my hosting provider.
Thanks!
Andrew
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en