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.

URL ?'s

July 08, 2007 5:51pm

Subscribe [0]
  • #1 / Jul 08, 2007 5:51pm

    Christian Sweatt

    281 posts

    Since building my EE site in its testing environment, I noticed that the URL’s are a bit different from what I had expected them to be.

    Since I work with a university, web sites are assigned a directory, never are departments put into the root.  So, I would have something like http://www.university.edu/department.

    Well, lets say I worked with financial aid, and I wanted to let people know contact information.  The URL would be http://www.usm.edu/financialaid/contact/

    In EE, however, it shows as http://www.university.edu/financialaid/index.php/contact

    How do I get just http://www.university.edu/financialaid/contact  ???

    I searched the docs, but came up with nothing; only an explanation of EE URL’s.  In the forums I read something along the lines of having to create a template group for each additional page???  That seems to be a bit overkill, eh?

    What’s the best way of doing this?

  • #2 / Jul 08, 2007 5:56pm

    Jason Morehead

    456 posts

    It sounds like what you’re really asking is how to remove the “index.php” from the URL.  Take a look at this wiki entry.

    I searched the docs, but came up with nothing; only an explanation of EE URL’s.  In the forums I read something along the lines of having to create a template group for each additional page???  That seems to be a bit overkill, eh?

    That’s one way of doing it.  Or you could use the Pages module.

  • #3 / Jul 08, 2007 6:01pm

    Christian Sweatt

    281 posts

    GEEZE, are you kidding me?!  HAHAHA It may more worth my time to just leave the index.php in the URL….  I feel like I’m having to work around the entire system just to get that removed.  :ahhh:


    Well, I’ll give it a try and see if I can actually do this.  It seems to me like there would be an easier way for this to be done.

    Thanks a lot of the info, though.  At least I have something to go by, if I do end up having to change things around.

  • #4 / Jul 08, 2007 6:06pm

    Lisa Wess

    20502 posts

    Hi, Christian—

    Removing index.php is not hard.

    As to your setup, I’m not a fan of setting up content based on what the URL will be (with Pages being the exception).  URLs should be friendly, sure, but they’re a small part of the SEO picture, where content is the main important factor.

    You might consider what your data is and how you want to organize it, and then see how it will all fall into place from there.

  • #5 / Jul 08, 2007 6:21pm

    Christian Sweatt

    281 posts

    LoL, Lisa, you even work on Sundays..  That’s great!  Collect that over time!  😜

    I wouldn’t really mind the URL, the only reason I’m asking is because MANY pages link to the one’s already set up on the old site.  Changing them all would result in a lot of broken url’s throughout the university web site.  We also have awful guidelines which we have to follow.

    Personally, I wouldn’t mind keeping them as they are.  If I do have to change them, I’ll wait until we purchase the licensed version (yeah, we’re STILL working on that), and I’ll use the pages module.

    Thanks again for the feedback!

  • #6 / Jul 08, 2007 9:09pm

    ms

    274 posts

    In EE, however, it shows as http://www.university.edu/financialaid/index.php/contact
    How do I get just http://www.university.edu/financialaid/contact ???

    If I understand your setting correctly, the directory /financialaid/ would be given by administration and you want EE not to handle all content of all departments but (in this case) just for the financial aids?

    In your (perhaps simplified) example, it would be more or less easy to setup EE in the document root, serving the content for all departments: every department would get its own template group, contact would be one template in the template group financialaid. That would result in http://domain/index.php/financialaid/contact ... and removing the index.php would give you the result you sketched.

    However, that would need at least control over the web document root, if not all departments would be switched to EE.

    In addition, your example of a typical EE URL is a bit reduced:
    index.php/contact would most likely really be index.php/contact/index where contact is the template group and index the replacement for the missing template. Most URLs in EE have the form
    (domain)/index.php/templategroup/template/url_title/additional/segments/following

    Of course, most of this is optional (most of the time). While you have full control about the templategroup/template part and can specify the url_title for single entry pages, some additional segments will be used by EE automatically in some circumstances (for example when using pagination).

    You now would have to think about your URLs and how they best fit into an EE structure.

    In addition to removing index.php, outside of EE you can use .htaccess to rewrite the URLs even further. Again, you would have to make sure they will end in a structure that fits into EEs sceme. You could - for example - rewrite
    (domain)/financialaid/contact
    to
    (domain)/financialaid/index.php/financialaid/contact (calling the templategroup financialaid of an EE installation inside the directory financialaid and there the template contact)
    or even
    (domain)/financialaid/index.php/financialaid/static/contact (calling the templategroup financialaid of an EE installation inside the directory financialaid and there the template static serving an entry named contact)
    The possibilities using mod rewrite are endless, however the usage isn’t always easy. Its a feature of the Apache web server, so things might be different on IIS.


    So, while I’d agree with Lisa, in case it is really needed, clever naming of templategroups, templates and entries (URL titles) together with .htaccess/rewrite would be the way to go.

    -Markus

  • #7 / Jul 09, 2007 1:58pm

    Christian Sweatt

    281 posts

    Thanks Markus,

    I’ll definitely keep everyone’s points in mind as I dive into EE.

    I just looked over your Branchenwissen.info site.  I’m originally from Germany, and it was nice to see it!

    @ Lisa:  We’re purchasing today after lunch!!!  About 1 hour and 30 minutes!  :cheese:

  • #8 / Jul 09, 2007 2:16pm

    Lisa Wess

    20502 posts

    Oh my god, I don’t believe it! *ducks*  Let the countdown begin. 😉

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

ExpressionEngine News!

#eecms, #events, #releases