Home Forums WordPress Plugins Hide My WP Issue with File Uploads Set as Relative Path

This topic is: resolved

This topic contains 4 replies, has 2 voices, and was last updated by  dub3325 3 months, 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #17266
    dub3325
    Post count: 5

    I have an issue when trying to redirect the uploads folder. The line in question is: RewriteRule ^site/assets/(.*) /wp-content/uploads/$1?gxb_hide_my_wp=1111 [QSA,L] (I’ve also tried adding a / after the ^ in an attempt to use absolute path) .

    The problem is, the file path on the front end is relative to the current page the user is on (www.site.com/subdirectory/site/assets/file.jpg vs http://www.site.com/site/assets/file.jpg).

    The file gets uploaded correctly to the root, however, the html referencing the file always points to the relative url. How do I get it to map from the root domain? I can’t seem to figure it out after hours of trying to modify the expression.

    I will post my debug report in a private reply to this thread…see below

    #17267
    dub3325
    Post count: 5
    This reply has been marked as private.
    #17268
    dub3325
    Post count: 5
    This reply has been marked as private.
    #17273
    Suman Maharjan
    Post count: 7263

    Hi, can you please try adding the following replacement in “replace in html” option under Replace Tools tab:

    "site/" ==> "/site/"

    #17279
    dub3325
    Post count: 5

    Perfect, that did the trick! Thanks a lot Suman….cant believe it was such a simple fix. Appreciate the help.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.