ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Oh I am so angry

August 06, 2007 7:51pm

Subscribe [4]
  • #1 / Aug 06, 2007 7:51pm

    James Prickitt

    77 posts

    http://www.medicalpracticetrends.com/

    Link to an entry:

    http://www.medicalpracticetrends.com/mpt/articles/strategic-planning3/

    that gives me a page not found

    I don’t want the template group in there, but I will if I have to.

    I have an articles template

    http://www.medicalpracticetrends.com/articles/strategic-planning3/

    and an article template:

    http://www.medicalpracticetrends.com/article/strategic-planning3/

    They have the exact same code.

    Is it the path settings? Why does that make a difference?

  • #2 / Aug 06, 2007 8:04pm

    PXLated

    1800 posts

    Just to clarify…
    http://www.medicalpracticetrends.com/mpt/articles/strategic-planning3/
    Did you rename your index.php to mpt? If not, what’s it represent?

    I don’t want the template group in there, but I will if I have to

    EE’s automatic functions rely on it so it’s much easier all the way around if you use them. If you don’t want to, you’ll probably have to tell EE “manually” what’s what with url_segments and the dynamic=“off” parameter, etc.

    They have the exact same code…Is it the path settings? Why does that make a difference?

    I’m not seeing any difference, 404s in both.

    Does everything work if you do use the TemplateGroup in the paths? And, what is the templateGroup name?

  • #3 / Aug 06, 2007 8:23pm

    Sue Crocker

    26054 posts

    PXLated is correct about EE’s automatic functions relying on the template group.

    Are you doing any sort of .htaccess stuff to swallow up index.php?

  • #4 / Aug 07, 2007 12:58pm

    James Prickitt

    77 posts

    mpt is the template group

    Yes I am using .htaccess to swallow up index.php. That seems to have been working fine so far.

    I used to try to take out the template group but I have scrapped that idea for now. So after I deleted the blog and site, and started it over fresh, I have not tried to take out the template group. I’m trying to figure out how I “should” be doing it, including using the template group.

    The .htaccess:

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

    Note:
    Yes, Lisa Wess did recommend using the other method because this is server-intensive. I couldn’t get the other way to work so I figure I’ll leave it this way and come back to it later to improve the performance.


    So, I’d think that this URL should work??:

    http://www.medicalpracticetrends.com/mpt/articles/strategic-planning3/

    - has the template group “mpt”
    - has the template “articles”
    - has the post slug “strategic-planning3”

  • #5 / Aug 07, 2007 1:01pm

    James Prickitt

    77 posts

    Path Settings:

    Comment Page URL is set to:

    http://www.medicalpracticetrends.com/mpt/articles/

    Blog URL:

    http://www.medicalpracticetrends.com/

    What should it be?

  • #6 / Aug 07, 2007 1:07pm

    Robin Sowell

    13255 posts

    It looks ok from here- can you paste the contents of your articles template so we can take a look at the code?

  • #7 / Aug 07, 2007 1:10pm

    James Prickitt

    77 posts

    Is this correct?

    Because the .htaccess has "mpt" in the RewriteRule, 
    "mpt" should not be in the URL, because EE puts "index.php/mpt/"in the URL for you.

    So what is happening is that I end up with a double “mpt”?

  • #8 / Aug 07, 2007 1:15pm

    Robin Sowell

    13255 posts

    Possibly.  At least, that rewrite rule doesn’t conform to the one on the wiki.  Though note- using htaccess to remove index.php isn’t officially supported- that’s why it’s over on the wiki.  What works will depend on the server setup.  That said- try removing it so it does conform to the wiki.

    And if that doesn’t work- what I’ll always do is remove the htaccess and make certain that everything works according to the standard EE setup- with the index.php in there.  If everything works as expected that way, then you can go back and work on the htaccess, having localized the problem.

    Make sense?

  • #9 / Aug 07, 2007 6:19pm

    Derek Allard

    3168 posts

    Your site, and the htaccess all seem to be working as intended.  You are absolutely correct about it inserting “mpt” twice. 

    Notice that without an “index.php/mpt” in the address bar, it adds it automatically.

    http://www.medicalpracticetrends.com/articles/strategic-planning3/ (which works) is the same (as your server is concerned) as http://www.medicalpracticetrends.com/index.php/mpt/articles/strategic-planning3/.

    What won’t work (with your curret htaccess) is http://www.medicalpracticetrends.com/mpt/articles/strategic-planning3/ as the server interprets it as http://www.medicalpracticetrends.com/index.php/mpt/mpt/articles/strategic-planning3/.

    htaccess issues do get complicated.  You might want to only remove index.php and leave mpt in there… but that’s your choice of course.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases