I am working on making my site more SEO friendly I am currently using
RewriteEngine On
RewriteRule (.*)$ index.php?page=$1
To turn site.co.uk/index.php?page=page_name
into site.co.uk/page_name
I want to also use this for sub pages too.
I have tried this:
RewriteEngine On
RewriteRule (.*)/(.*)$ index.php?page=$1&subpage=$2
but its not working, it runs site.co.uk/page_name/sub_page
but when you go to site.co.uk/page_name
it returns the 404 not found.
I want it to run site.co.uk/page_name
and it return page_name
or
site.co.uk/page_name/sub_page
and return sub_page
and so on
site.co.uk/page_name/sub_page/sub_page2/...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…