Viewing 15 replies - 1 through 15 (of 15 total)
  • Don’t think so.
    The last url there is looking for file s03 in folder ‘dribbling’ which is in folder ‘skills’ etc, and the actual article is getting the correct url.

    Thread Starter basketball

    (@basketball)

    Well in the end I just created a whole bunch of directories (not fake or static) used includes and used the absolute path to require the wp-blog-header.php file and it worked out all right.

    For sure this is possible. mod_rewrite can do almost everything you’ll ever want concerning URL rewriting.
    To do the trick, open you .htaccess file in the site root and add an additional RewriteRule between the RewriteBase directive and the first WP created Rewrite Rule. The rewrite rule should simply be:
    RewriteRule ^information/skills/dribbling/s03/?$ /information_skills_dribbling_s03.php [QSA].
    The first parameter is the path requested by the browser (the /? means that the ending slash is optional), the second parameter is the actual file on the harddrive which should be served for this Request.
    You could also have a look at the URL Rewrite Guideand maybe at the mod_rewrite Reference for further documentation.

    A Permalink Sturcture may help u !

    Yeah I was going to tell the same thing about rewrite rules.
    If you plan to use this trick often, you could set up a general rule like :

    RewriteRule ^information/([_0-9a-z-]+)/?$ /information_$1.php [QSA]
    RewriteRule ^information/([_0-9a-z-]+)/([_0-9a-z-]+)/?$ /information_$1_$2.php [QSA]
    RewriteRule ^information/([_0-9a-z-]+)/([_0-9a-z-]+)/([_0-9a-z-]+)/?$ /information_$1_$2_$3.php [QSA]
    RewriteRule ^information/([_0-9a-z-]+)/([_0-9a-z-]+)/([_0-9a-z-]+)/([_0-9a-z-]+)/?$ /information_$1_$2_$3_$4.php [QSA]

    So that any file located in /information could be accessed via “fake folders” :
    /information/hello/ would redirect to /information_hello.php
    /information/so/cool/ would redirect to /information_so_cool.php
    /information/I/am/l33t/ would redirect to /information_I_am_l33t.php
    and so on …

    (not sure you could handle any length of fake URL with a single rewrite rule instead of creating one for each as I did)

    Can someone help me about this nicer URLS thing, I’ve no idea how to edit my htaccess.

    My gallery URL is

    https://liberta.espoireve.com/wordpress/lazyest-index.php

    and I want it to be sth like this

    https://liberta.espoireve.com/inspiring/

    For the sub pages

    it’s https://liberta.espoireve.com/wordpress/lazyest-index.php?file=Blends/

    and I want it sth like this

    https://liberta.espoireve.com/inspiring/blends/

    When viewing the image

    https://liberta.espoireve.com/wordpress/lazyest-index.php?file=Others/butterfly3.jpg

    to

    https://liberta.espoireve.com/inspiring/blends/butterfly3.jpg

    (I think a general rewrite rule for that? because there’s tons of images, I can’t edit the htaccess for every single image?

    Any idea how to work that out?

    Thanks ??

    Any help would be greatly appreciated ??

    Can anyone with some knowledge of htacess help me with that? In need of desperate help. Thank you =)

    Thanks Ajay for the link but it didn’t have really what I mean. Hmm.. I read through

    https://httpd.apache.org/docs/misc/rewriteguide.html

    too but still don’t know how to edit the htacess like the ones ozh has written.

    point me in the wrong direction?

    Thanks

    I guess ozh is the best person to answer. That is something even I am looking for !

    Yup, I’m looking for that too for some time but no one has yet to know how to write the rewrite rules. Hope someone who has some idea how to go about doing it could help. ??

    Anyone? please help? Desperate =(

    still no help? anyone?

    I tried putting this into my htacess.. at the bottom after the wordpress one

    edited it from the one ozh wrote but my permalinks aren’t working after tt. =(

    RewriteRule ^(.+/)inspiring/?$ $1?wordpress/lazyest-index.php [QSA,L]
    RewriteRule ^(.+/)([_0-9a-z-]+)/?$ $1wordpress/lazyest-index.php?file=$2 [QSA,L]
    RewriteRule ^(.+/)([_0-9a-z-]+)/([_0-9a-z-]+)?$ $1wordpress/lazyest-index.php?file=$2/$3 [QSA,L]

    Y’know what I do when I need something special in my .htaccess? Contact my host, explain the situation, and ask them to set it up for me. Works every time.

    mine is hosted by my friend and I’m not sure what host he’s using etc =x so that’s why I’m looking for help over here but seems that none could help me yet.. =(

    thanks for the suggestion though

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Nicer URLs’ is closed to new replies.