Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End .htaccess mod_rewrite

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #28136
    copperSmith
    Member

    How would I go about doing this:

    I want all urls that are:

    domain.org/directory/file-name.html

    to be redirected to that same file name but with an expanded directory path

    domain.org/directory/subdirectory/file-name.html

    I am imagining/learning that this is possible, but must be done via a 301 permanent redirection. I just can’t seem to cut through the formatting for .htaccess files to accomplish this. My CMS is taking all my relative links and turning them into root relative… so taking: "../directory/file-name.html" and turning it into "/directory/file-name.html"

    So a link that leads to:

    domain.org/directory/subdirectory/assets/style.css

    via relative links for example, is being turned into:

    domain.org/directory/assets/style.css

    And breaking.

    Any help would be greatly appreciated.

    [reposting in General and PHP]

    Thanks,

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.