Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Rewrite URL in htaccess to hide certain characters

Discussion in 'General Discussion' started by Mattrpm, Feb 7, 2018.

  1. Mattrpm

    Mattrpm Registered

    Joined:
    Feb 7, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bournemouth
    cPanel Access Level:
    Website Owner
    Hi guys
    I have a problem and also lack the understanding to put this rewrite rule in place.
    I only need to remove these characters from any URL on our website ?rid=

    from this:
    example.co.uk/coffee/?rid=A611F4

    to this:
    example.co.uk/coffee/A611F4

    The first section is created by wordpress example.co.uk/coffee/
    and last part is created by an Xmpie system ?rid=A611F4
    the 6 digit number is dynamic and specific to making the webpage personalised to them.
    I have been told by Xmpie support that this can be done in the wordpress .hatches

    We use apache and Wordpress.
    The code I have in my .htaccess file on our apache server is 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>
    
    is it possible to show me the process as i lack experience

    Really appreciate some help on this

    Kind Regards
    Matt
     
  2. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    719
    Likes Received:
    245
    Trophy Points:
    93
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael and cPWilliamL like this.
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,277
    Likes Received:
    1,846
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The URL noted in the previous post is a good place to start.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice