Say I have a site mysite.com, which is a wordpress site.
I already have the following rewrite rules to remove index.php:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
if I go to mysite.com/?blog_type=a-blog-type I get the proper page with only the blogs of that type
What I would like, is for the user to be able to type in mysite.com/blogs/a-blog-type/ and have that acutally do the query, but keep on displaying /blogs/a-blog-type/
I’ve looked at many similar answers on here, but most seem to make it so that it just redirects from the query, to the pretty url, which I don’t want, as the pretty url just leads to a 404 error as it’s not doing the query.
Thanks for the help.
This rewrite rule will take any
mysite.com/blogs/a-blog-type/
URL and rewrite it tomysite.com/?blog_type=a-blog-type
. Somysite.com/blogs/a-blog-type/
would be displayed to the user, butmysite.com/?blog_type=a-blog-type
will be loaded.EDIT: So here’s how your config will now look: