1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Basic URL Rewrite Help Please!

Discussion in 'General Scripting Chat' started by hendrix91, Oct 28, 2014.

  1. hendrix91

    hendrix91 Newbie

    Joined:
    Feb 5, 2013
    Messages:
    20
    Likes Received:
    1
    I'm using a plugin to create and display domains I'm selling.

    For each individual domain listed the plugin creates a single post.

    The url of the single post is automatically generated as "/?mdlp_my_domain_list=znvr-com" where znvr.com is the domain for sale and title of the post.

    What I would like is to clean up the url by removing "/?mdlp_my_domain_list=" and having it displayed as "/znvr-com"

    I've looked inside the plugins php files, but can't seem to find what line of code is displaying the urls this way (only have basic php knowledge).

    I think a simple htaccess rewrite is all I need to fix it, but nothing I've tried is working so far.

    Any idea how I can fix this? It would be greatly appreciated!
     
  2. SEODEMON

    SEODEMON Regular Member

    Joined:
    Sep 15, 2010
    Messages:
    220
    Likes Received:
    64
    Does The Plugin has Short Codes for url modification? You can fix this with the .htaccess but the easy way would be to get a SEO plugin. Many of them are free or nulled.

    Yoast is nulled on The Pirate Bay torrent site. You can pretty much modify the url to whatever you want with shortcodes in the url. Like %title% %date% Title of your post etc... You may have to delete your current plugin.
     
  3. FBGuru

    FBGuru Senior Member

    Joined:
    Sep 22, 2013
    Messages:
    928
    Likes Received:
    1,171
    Location:
    Personality Type : ESTP
    Add the following lines to your .htaccess and post your results below.

    Code:
    RewriteEngine on
    RewriteRule ^(.*)?mdlp_my_domain_list=(.*)$ $1/$2 [R=301,L]
    
     
  4. SEODEMON

    SEODEMON Regular Member

    Joined:
    Sep 15, 2010
    Messages:
    220
    Likes Received:
    64
    Im not that good with Wordpress url rewrites. I dislike wordpress because I feel I have better control with HTML and css code. I can change things fast and build it from the ground up.

    If this helps and at all, I use static HTML templates for my HTML site for cities and Keywords.

    Code:
    Example
    rewriteCond %{REQUEST_FILENAME} !-f
    rewriteCond %{REQUEST_FILENAME} !-d
    rewriterule ^keyword-([a-z_A-Z]+).html?$ city/keyword/template1.php?filename=$0&state=$2&city=$1&keyword=$4 [L] 
     
  5. hendrix91

    hendrix91 Newbie

    Joined:
    Feb 5, 2013
    Messages:
    20
    Likes Received:
    1
    Modified htacces to this:
    Code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    
    RewriteEngine on
    RewriteRule ^(.*)?mdlp_my_domain_list=(.*)$ $1/$2 [R=301,L]
    
    
    # END WordPress
    
    Did not work. Urls still appearing the same.
     
  6. FBGuru

    FBGuru Senior Member

    Joined:
    Sep 22, 2013
    Messages:
    928
    Likes Received:
    1,171
    Location:
    Personality Type : ESTP
    Try this :

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