• Hi all,

    My goal is to get
    https://polopony.com/polo-directory/polo-club/united-states/michigan/
    to mask the URL as
    https://polopony.com/index.php?pagename=polo-directory&url=/polo-club/united-states/michigan

    I have tried many different RewriteRules, and I’m so close I think. This is the on that I feel is the closest.

    RewriteRule polo-directory/([^/\(\)]*)/?([^/\(\)]*)/?([^/\(\)]*)/? /index.php?pagename=polo-directory&url=\/$1\/$2\/$3 [QSA,L,R,NS]

    I created a physical directory and a wordpreess page called polo-directory and put the .htaccess with the rule above in the file (full file below). I am using /%category%/%postname%/ permalink structure.

    Somebody told me to look at the WP_rewrite class documentation, which is fine except I need the rule to work with for that.

    Any help you all have would be much appreciated =)

    Thank you =)

    Light and Love and Healing to you,
    -Patrick Arden McNally

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule . /index.php [L]
    #RewriteRule uncategorized/ /index.php [L]
    #RewriteRule !^(polo-directory)/ /index.php [L]
    RewriteRule polo-directory/([^/\(\)]*)/?([^/\(\)]*)/?([^/\(\)]*)/? /index.php?pagename=polo-directory&url=\/$1\/$2\/$3 [QSA,L,R,NS]
    #RewriteRule polo-directory/([^/]+)/([^/]+)$ /index.php?pagename=polo-directory&url=$1\/$2\/ [NC]
    #RewriteRule polo-directory/([^/]+)/([^/]+)$ /polo-directory/?url=$1/$2 [NC] 
    
    RewriteRule SITEURL ./ [L]
    </IfModule>
    
    # END WordPress
  • The topic ‘Help with mod rewrite’ is closed to new replies.