[resolved] add second rewrite rule and how to construct? (2 posts)

  1. Cammy_WP
    Posted 4 years ago #

    I never wrote .htaccess before.

    this is from wordpress pretty permalinks

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]

    this works

    now i want to add another rule
    to rewrite everything else:
    /blog/wp-content/themes/themename/ (all folders and files)
    also to /blog/ (all folder and files)

    example: http://mydomain.com/blog/images/myimage.png from
    http://mydomain.com/blog/js/myjavascript.js from

    how do I add another rule?
    and how do i construct the second rewrite rule ?

    this is as far i got with a foolish attempt, but didnt work offcourse
    RewriteRule ^blog/(.*)$ blog/wp-content/themes/themename/$1 [NC,L]

  2. tasty.donuts
    Posted 4 years ago #

    Uh I don't think that's how the redirects work ... your best bet is to check with your hosting provider -- either their support docs or their forums should have the right answer for you...

    Also if you're just trying to hide your wp-content folder you should look into some plugins and/or just renaming the name of the folder itself.

Topic Closed

This topic has been closed to new replies.

About this Topic