Wordpress Rewriterule php in page

by 4 replies
5
Hello to everyone.
I want to change my links from
site .com/league/?c=england
to
site .com/league/england

site .com/league/?c=england loading information from site .com/folder/leaguestat.php

I try this code in .htaccess
Code:
RewriteRule ^league/(.*)$ folder/leaguestat.php?c=$1 [L]
and he works but wodpress lose template

P.S. Im new and sorry if this is wrong section
#programming #page #php #rewriterule #wordpress
  • Not sure about adding your own rewrite rules to htaccess, it looks like what you want might be addressable through the 'Perma Links' functions on the admin control panel. (Perhaps you have the htaccess part right, but Wordpress doesn't know what to do afterwards without the Perma Links setup.)

    Harrison
  • "change category permalink" search in the wordpress add plugin menu
    and choose a plug in. Usually, this is the first thing you need to do to find wordpress solution for your issues.
    • [1] reply
    • In wordpress settings of Permalinks im on Custom structure - /%postname%/

      P.S. PHP Execution is name of my plugin to read php code in Posts and Pages
  • UP
    I cant undestand why when i make code with id all works perfect but with symbols doesnt

    With
    Code:
    RewriteRule ^league/([0-9]+)$ folder/leaguestat/?c=$1 [L]
    Wordpress doesnt lose template and show right information.

Next Topics on Trending Feed