I have a custom page on my theme that displays differently based on given parameters. This page is set as homepage for the website. Valid parameters combinations can be as follows:
my_domain/?fa={action}&type={type}
my_domain/?fa={action}&id={type}
my_domain/?fa={action}
What i'm trying to do is to convert these links to the following:
my_domain/fa/{action}/type/{type}
my_domain//fa/{action}/id/{type}
my_domain/fa/{action}
My .htaccess file now looks like this, but it doesn't seem to work:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^fa/(.*)/type/(.*)$ /index.php [L]
RewriteRule ^fa/(.*)/id/(.*)$ /index.php?fa=$1&fid=$2 [L]
RewriteRule ^fa/(.*)$ /index.php?fa=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
What am i doing wrong here?
Thanks, Radu
same issue, I used a class created by 'Kyle E Gentile' lost the link.
but his class is below. create a file: add_rewrite_rules.php
then in your funcitons.php file,
could be worth looking into.. i know it will work for your first two variables, fa & type but.. not sure if you could re-write a little to add the ID,
Marty