Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder
    Join Date
    Aug 2004
    Location
    Nashville
    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Wordpress ModRewrite Issue (.htaccess)

    I've got a custom plugin that's essentially a member directory search and pull all of my data from our API to display results. The thing is that I need the URL's to be "friendly" but I'm not having much luck with my htaccess.

    The ugly URL is something like:

    Code:
    http://localhost/wordpress/providers/?provider=498&providerName=john+r+doe
    I want it to be:

    Code:
    http://localhost/wordpress/providers/498/john+r+doe
    I've tried the following in my htaccess:

    Code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^providers/(([^/]*))/(([^/]*))/$ /index.php?page_id=2 [L]
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>
    
    # END WordPress

    Any help is definitely appreciated.

    Thanks
    Last edited by macmonkey; 03-09-2016 at 04:14 PM.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •