This url
example.com/videos/load.php?cat=video-category
would become
example.com/videos/video-category
Also, there is pagination and limit url
example.com/videos/load.php?cat=video-category&p=2&limit=20
and it would become
example.com/videos/video-category?page=2&limit=20
this url also work
example.com/videos/video-category?page=2
example.com/videos/video-category?limit=20
Here is my htaccess (into videos
folder)
Options +FollowSymLinks
RewriteEngine on
RewriteBase /videos/
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,NE,L]
RewriteRule ^([^/]+)/?$ load.php?cat=$1 [L,QSA]
RewriteRule ^([^/]+)/page/?$ $1 [R=301,L]
RewriteRule ^([^/]+)/page/([1-9][0-9]*)$ load.php?cat=$1&p=$2 [L,QSA]
how to do this.. plz help me.. thanks..
Think maybe you're looking for something like this?
Options +FollowSymLinks
RewriteEngine on
RewriteBase /videos/
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,NE,L]
RewriteCond %{THE_REQUEST} \ /+videos/load\.php\?cat=([^&\ ]+)&?([^\ ]*)
RewriteRule ^ %1?%2 [L,R]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/?$ load.php?cat=$1 [L,QSA]
That satisfies the question you're asking, but your rules have stuff for /page/
, which isn't part of your question at all.