I create a page on wordpress and put php file on it. Now i can use it like that.
saita.com/wp_page_name/?name=blqbl&name2=name2 is to long
My question is how to rewrite .htaccess because I want my link to be like
saita.com/wp_page_name/name1/name 2 is to long
I forgot... my php file is in main root..
I tried to put in my .htaccess
RewriteRule ^(.+)/([a-zA-Z0-9-_]+)?$ upcoming.php?league=$1&division=$2
but it doesn’t work..
EDIT: If i get it right, i should change my .htaccess or should i put some new code in functions.php ?
EDIT2: I added this code
add_action('init', 'custom_rewrite_rule', 10, 0);
function custom_rewrite_rule() {
add_rewrite_rule('^machove/([^/]*)/([^/]*)/?','index.php??pagename=machove&league=$matches[1]&division=$matches[2]','top');
}
add_filter('query_vars', 'foo_my_query_vars');
function foo_my_query_vars($vars){
$vars[] = 'league';
$vars[] = 'division';
return $vars;
}
at the end of my functions.php, then i resave my permalinks and now when i open saita.com/machove/name1/name2 , my page info is from saita.com/machove/ but the url is saita.com/machove/name1/name2