WordPress.org

Ready to get started?Download WordPress

Forums

advanced rewrite help (5 posts)

  1. nathanielstern
    Member
    Posted 6 years ago #

    So, I deleted my old site, and am now using wordpress as a content management system at nathanielstern.com (ignore the "blog" - there are actually two wordpress installs, and i am talking about for the main site here).

    I'm trying to clean up my root folder a bit, and am having trouble with the rewrite rules. Basically, i want to do a few things like this:

    RedirectPermanent /images/ http://nathanielstern.com/media/old-images/
    RedirectPermanent /works/ http://nathanielstern.com/art/descending/

    They work great but I have a major problem: I have add-on domains that are effected negatively by these rules!

    So I was hoping someone could help me with rewrite rules that will only effect the main domain?

    The guys at my host suggested something like the following, but they don't work, and I don't understand them at all, and they won't help me any further...

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www\.)nathanielstern\.com
    RewriteRule ^images$ http://nathanielstern.com/media/old-images/ [R=301,L]

    Please help? Thanks,
    nathaniel

  2. nathanielstern
    Member
    Posted 6 years ago #

    bump - did a lot of searching, still no luck. i tried this:

    RewriteCond %{HTTP_HOST} ^nathanielstern.com$
    RewriteCond %{REQUEST_URI} ^/images/
    RewriteRule ^(.*)$ /media/old-images/$1

    But to no avail. Anybody?

  3. nathanielstern
    Member
    Posted 6 years ago #

    bump

  4. nathanielstern
    Member
    Posted 6 years ago #

    pretty please?

  5. nathanielstern
    Member
    Posted 6 years ago #

    Ok, maybe someone can at least suggest where I might look for help? I just don't understand most of the stuff that I've found about rewritecond, etc online; i need an explanation of the symbols used, not just what each line does, if I'm to write my own version. Thanks, n

Topic Closed

This topic has been closed to new replies.

About this Topic