May 17, 2018 at 8:36 am #271262
I have a single file
index.phpthat can accept variables like
index.php/?kw=my_keywordand change what is on the page using
Instead of creating a bunch of subdirectories I want my htaccess to create virtual subdirctories.
If the URL
www.example.com/my-keywordis used that URL will stay the same but show the content for
What do I need in my htaccess to do this?May 17, 2018 at 12:15 pm #271286
I can’t answer your question since the editor is deleting my answer over and over.
I try again:
These lines are saying: “If mod_rewrite exists turn on the rewrite engine.
Then you define your rule:
RewriteRule ^index/([A-Za-z\_]+)/?$ index.php?kw=$1
This is using regex to identify the URL to mach. You may need to change the regex.
Finally you need to close the IfModule;
You must be logged in to reply to this topic.