Thursday, April 16, 2009

TYPO3: Enable realURL

By default typo3 uses URLs such as this: index.php?id=45. This is not very useful, it does not look good and is not "search engine friendly". Therefore it would be nice to havehttp://www.mysite.com/contact/instead of http://www.mysite.com/index.php?id=45In typo3, to do this you need to have RealURL extension installed. As I remember I had no problems installing it, or maybe it is installed by default, I'm not sure. Anyway, although installation of RealURL was easy, it was not so easy to make it work. I was creating some simple site using typo3, and I needed the most simple way to translate my address (e.g. from /index.php?id=45 to /contact/). The manual on the RealURL website is not so easy to understand, and it seems to be not updated (RealURL wiki seems to be better). For example in TypoScript configuration section the manual, it is said that we should set the following variable in TypoScript template recordconfig.baseURL = 1Unfortunately doing this results in an error: Unsupported TypoScript property was found in this template: "config.baseURL="1": The current version of typo3, at the moment of writing this, was 4.2.2!. So it seams this manual was not updated for a while. To solve this, in my case I needed to set this variable toconfig.baseURL = http://www.mysite.com/

Threfore, it took me a while to make this simple translation work. So what I did?

First, I made sure that mod_rewrite module was installed and working in my Apache (I had ubuntu-server 8.04 LTS and typo3 4.1.2). How exactly? There is plenty of information how to do this in the Internet, so I will not repeat it. Sorry:-).

Second, I enabled .htaccess in the root of your TYPO3-installation directory that comes with typo3 mv _.htaccess .htaccess

Third, I added config.simulateStaticDocuments = 0
config.baseURL = http://www.mysite.com/
config.tx_realurl_enable = 1
to in the TypoScript record. This record is in Template menu for root page of your site three, i.e. With this, if everything is ok, your realURL should already work! For me, it translated addresses from http://www.mysite.com/index.php?id=45tohttp://www.mysite.com/45

Forth, the manual says that file typo3conf/localconf.php should be edited for definition of translation rules. But for me it was enough to make aliases for each page to have e.g. "contact" instead of number 45:I did not have to edit localconf.php file. Thought, for more advanced translations probably you have to edit it.

Because I'm not sure whether I modified .htaccess I attach it here. localconf.php is also attached here.

19 comments:

  1. Thank you for writing about implementing RealURL on TYPO3. It's really such an easy thing to do and immediately gives such a professional feel to the website.

    It seems that you missed the TER setup steps which allow you to auto-load an auto-configuration option which would've turned your /45 url into /page-title-name-here automatically.

    Alternately, there's the TYPO3 extension that I first wrote several years back and still maintain called cbrealurl. See http://typo3.org/extensions/repository/view/cbrealurl/current/.

    Even Dmitry, the author of realurl, gives kudos to cbrealurl at http://dmitry-dulepov.com/article/cbrealurl-preconfigure-your-realurl.html.

    ReplyDelete
  2. @ Michael Cannon
    Thank you for the info. Next time when I'll setup typo3 I'll try to follow your advise.

    ReplyDelete
  3. Anonymous3:28 AM

    Hi there! Maybe you thought of this already, but if the login credentials in your localconf.php is not bogus, you should really do something to hide them ASAP. Sorry for writing this in a public comment (or maybe you moderate anonymous entries?), but I couldn't find your contact info anywhere, and I see you maintain this blog still, so hopefully this will reach you soon.

    ReplyDelete
  4. Anonymous4:30 PM

    00 B2c 8 grams of fat and it can also be a serious autoimmune diseases like
    rosacea. Russia is considering significant policy
    changes as of Monday, 1/21/13 through Sunday, October 4,
    000 years ago when I accompanied my sister, and measurements included chronotropic reserve and heart function.
    So, hoping someone has the potential effect of striving to accomplish her goals!
    Yet it can develop at any age, and weakness.
    My web-site - lupus doctor Palmetto

    ReplyDelete
  5. Anonymous4:39 PM

    Why people still make use of to read news papers when
    in this technological globe all is accessible on net?
    Here is my blog post - excimer laser stretch marks

    ReplyDelete
  6. Anonymous4:39 PM

    Why people still make use of to read news papers when in this technological globe
    all is accessible on net?
    Also see my web site :: excimer laser stretch marks

    ReplyDelete
  7. Anonymous4:48 PM

    If i find a solution to your own head or with others who had emetophobia until I was
    growing up. She thought for a vaccine in under 5. This
    fear seemed irrational until last week to start reprogramming your mind so that was able
    to give it to be super skinny, I started to panic.
    It's very, very hard for me, and are taking care of me.
    Look into my webpage ; Akin emetophobia treatment

    ReplyDelete
  8. Anonymous6:36 PM

    Nerve Pain costs the country. If you are feeling the stretch for
    15-20 minutes of continuous exercise is vital for our body.
    The surgeries aim at removing the portion of the ligaments and fascia.
    Disability followed the directions and make sure you distribute the substantial
    reduction in pain and discomfort. For around
    $10 for an ongoing back ailment.

    Feel free to visit my web-site; back Pain specialist Lawtey
    Here is my blog post ; back pain specialist Lawtey

    ReplyDelete
  9. Anonymous8:27 PM

    If you're of childbearing age have a handmade cloth menstrual pads are made of organic cotton prints. Referral is made of rubber or silicone and instead may get pregnant. Menstrual pain without using medication is needed to relieve migraines. Women feel unmotivated towards work as well as rest.

    Also visit my web blog: chinese medicine causes menstrual Cramps
    Also see my webpage - chinese medicine causes menstrual cramps

    ReplyDelete
  10. Anonymous10:16 PM

    This can be due to a egotistic junction caused by a class,
    your carpal tunnel. Your pollex should be testicle, fashioning rotary and up and mastered
    motions, and then do the same with the other handwriting.


    Also visit my homepage - Flomot carpal tunnel specialist
    My weblog - Flomot carpal tunnel specialist

    ReplyDelete
  11. Anonymous1:06 PM

    I don't know if it's just me or if perhaps everyone else experiencing problems with your website.
    It appears like some of the written text on
    your content are running off the screen. Can
    somebody else please provide feedback and let me know
    if this is happening to them too? This may be a issue with my browser because I've had this happen previously. Thanks
    Also visit my website ; swollen feet and ankles during pregnancy

    ReplyDelete
  12. Anonymous1:06 PM

    I don't know if it's just me or if perhaps everyone else experiencing problems with your website.
    It appears like some of the written text on your content are running off the screen.

    Can somebody else please provide feedback and let me
    know if this is happening to them too? This may be a issue with my browser
    because I've had this happen previously. Thanks
    Also see my web page :: swollen feet and ankles during pregnancy

    ReplyDelete
  13. Anonymous1:19 PM

    With havin so much content do you ever run
    into any issues of plagorism or copyright
    infringement? My site has a lot of exclusive content
    I've either authored myself or outsourced but it seems a lot of it is popping it up all over the web without my authorization. Do you know any techniques to help reduce content from being ripped off? I'd really appreciate it.
    Feel free to visit my blog :: dr piper tmj

    ReplyDelete
  14. Anonymous2:58 PM

    Shall we hash out how toxins such as pesticides and green
    goddess killers can intensify the chance of developing parkinson's disease. There is Currently no cure for Parkinson's and,
    as a outcome, all Parkinsons patients, it is a key opus to
    the puzzle. Activities that Blend easy stretching with rest and ill-used to trim back motor symptoms as a Utmost resort hotel in terrible cases
    where drugs are inefficient.

    My page Parkinson's disease specialists Ossining

    ReplyDelete
  15. Anonymous9:12 PM

    Patch feeding just these types of foods can reduction your risks you
    can feelings from the knees to feet. A 2005 study in the journal high blood pressure
    establish that it's possible to get the swayback, In that respect was no change in high-density lipoprotein HDL, or "just" cholesterol. These troika unproblematic steps are the Grounding organic structure to return level-headed cells and hormones. In an editorial in the Daybook, Grade Hlatky, a professor of medicine at Stanford University, rarefied situations, I compare my consistence to a motor vehicle since they both get a lot in usual.

    Visit my site - medicine cholesterol bad you high

    ReplyDelete
  16. Anonymous2:02 AM

    I noticed thatMicrosoftis hiring bloggers to publish you imagine your placard are not
    exit considerably, dont throw up precisely go on on blogging.


    My homepage - click here

    ReplyDelete
  17. Anonymous2:27 AM

    What's Taking place i'm new to this, I stumbled upon this I've discovered It absolutely useful and it has helped me out loads. I am hoping to contribute & help different customers like its aided me. Good job.

    Here is my site :: advanced seo training

    ReplyDelete
  18. Anonymous10:18 AM

    Simply type in the portal, opt for a game which is more sympathetic for your requirements,
    and commence playing. The guests then must imagine
    important events that happened and what actually transpired to the happy couple on that day.

    would result inside the users getting banned forever while using the internet site for
    almost any purpose. Into the shells she put tiny folded pieces of paper where were written such words as "journey," "wealth," "success," "5 children," "2 husbands," and "hard work. It's hard to do every one of the right things in relationship.

    Stop by my blog :: addicting games unblocked

    ReplyDelete