Forum Moderators: phranque
i have a book store site, it contains some dynamic links like while browsing a category it is -
[mysite.com...]
and while opening a book detail it is-
[mysite.com...] book name
Now i want to remove query string from url's so taht it can be user friendly and search engine friendly.
I searched about mod rewrite and generated 2 rewrite rule s using webmaster-toolkit site, rewrite url is given below.
Options +FollowSymLinks
RewriteEngine on
RewriteRule bookinfo/(.*)/(.*)/$ /bookinfo.php?$1=$2
RewriteRule books/(.*)/(.*)/$ /books.php?$1=$2
Now i am confsed in how to implement it. after uploading this .htacces file i tried to open this link
[mysite.com...]
[mysite.com...] book name/
but it is showing page not found error. Is there any thing else i have to do for implementation of mod rewrite
I checked my server is running mod_rewrite module.
Here is a big question is my existing pages with query string url's need any chanegs?
which url i should enter in address bar with query string or according to rewrite rules?
Please help me in implementing it.
Vineet
.htaccess code is -
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^bookinfo/([^/]+)/?$ /bookinfo.php?book=$2 [L]
RewriteRule ^books/([^/]+)/([^/]+)/?$ /books.php?$1=$2 [L]
I checked using phpinfo(), it is showing that mod_rewrite module loaded.
now when i try to open this link
[mysite.com...] book name/
and
[mysite.com...]
it is saying page not found.
dynamic link corresponding to abovelink -
[mysite.com...] book name
and
[mysite.com...]
Please help me what is problem.