We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26921
    • 4 Posts
    Hello experts,
    Thanks for reading.I am newbie and need your help. :’(

    I have a link like http://syd-srv06.ezyreg.com/~haha7316/personal/personal/CV/
    I want to make it like http://syd-srv06.ezyreg.com/~haha7316/personal/CV/
    remove /personal/ fully from the link.
    some more links :
    Currently : http://syd-srv06.ezyreg.com/~haha7316/lumina-diem/Case-History/Section-1/
    I want it : http://syd-srv06.ezyreg.com/~haha7316/lumina-diem/Case-History-Section-1/
    replace / with -

    Currently : http://syd-srv06.ezyreg.com/~haha7316/lumina-diem/Transcripts/Transcripts-Section-5-Temporary-Orders-Hearing/
    i want it : http://syd-srv06.ezyreg.com/~haha7316/lumina-diem/Transcripts-Section-5-Temporary-Orders-Hearing/
    remove /Transcripts/ fully from the link.
    --------
    Note: /personal/personal/ here both are weblinks,parent weblink : personal->personal(child weblink)->CV(Document)
    Its nice to organise the documents in this way but i am using furl with path enabled so now some child weblinks(contailers) are badly needed to removed from the full URL.
    ---------

    How can i do it using .htaccess ?

    My current .htaccess is like followings :
    __________________________
    # For full documentation and other suggested options, please see
    # http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
    # including for unexpected logouts in multi-server/cloud environments

    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /~haha7316/

    # Fix Apache internal dummy connections from breaking [(site_url)] cache
    RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
    RewriteRule .* - [F,L]

    # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
    #RewriteCond %{HTTP_HOST} .
    #RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
    #RewriteRule (.*) http://www.example.com/$1 [R=301,L]

    # Exclude /assets and /manager directories from rewrite rules
    RewriteRule ^(manager|assets) - [L]

    # For Friendly URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]

    # Reduce server overhead by enabling output compression if supported.
    #php_flag zlib.output_compression On
    #php_value zlib.output_compression_level 5


    RewriteCond %{HTTP_HOST} ^courtofpublicjustice.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.courtofpublicjustice.com$
    RewriteRule ^/?$ "index\.php\?id\=142" [R=301,L]

    RewriteCond %{HTTP_HOST} ^luminadiem.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.luminadiem.com$
    RewriteRule ^/?$ "index\.php\?id\=17" [R=301,L]
    _________________________________________________