I have searched and searched and tried soo many different things that just didnt work... It is beyond me. I've tried at least 50 things with no luck.. someone please help!
First I have a a file "index.php" page within the folder /blog that has a link that passes variables to a page called "post".. The MySQL in the "post.php" page pulls the MySQL data from row that matches ID and displays that specific post.
What I am trying to do is have a much cleaner and SEO friendly URL...
For example: on the "www.mydomain.com/blog/index.php" page they click a link like "post?title=This%20is%20a%20test%20title%20for%20the%20blog%20post...&id=1" which takes them to the "post.php" page in the same directory as the "index.php" page in "/blog/"..
Every single htaccess rewrite I have found is not changing the URL to a much friendlier version at all.. everything ends up staying the same..
Someone please help. I would like it to show as www.mydomain.com/blog/title rather than showing the above! If anyone could help me remove the "%" that appear in post titles for spaces and replace with "-" that would be really great too..
::desperate:: Thanks again, Adam
Currently Using this in a htaccess file located in the "blog/" directory.
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R=301,NC,L]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomain.com/blog/$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/blog/$1 [R=301,L]
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /post?title=$1&id=$2 [QSA,L]