This does contain php so I am asking it here, not sure where else to ask it. If this is the wrong board, I really do apologize in advance.
My PHP script uses URLS like:
Code: Select all
index.php?page=members&do=add
index.php?page=about
index.php?page=get&code=9089fsd90fsdf
What I am looking to do is shorten the URLS using htaccess, but I am lost as how to do it. I have tried a few different .htaccess approaches but they have not treated me well.
The closest .htaccess to what I need is
Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteRule index/(.*)/(.*)/(.*)/(.*)/$ /v2/index.php?$1=$2&$3=$4
Which generates a URL like
Code: Select all
http://www.SomeSite.com/index/page/get/code/0984590348590/
What I am looking to do is strip the index and page part out of the address (ie no /index/page/) however when I modify the htaccess to look like this:
Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)/(.*)/(.*)/(.*)/$ /v2/index.php?$1=$2&$3=$4
I just get the page cannot be displayed. Any idea how to change the htaccess to allow for the short URLs like I am looking for (ie something like):
Code: Select all
http://www.SomeSite.com/get/code/0984590348590/
Note that none of the above examples have worked for me.
Thanks ahead of time for the help!