Question

Single URL mod_rewrite not showing Wordpress post-type content

By saschaeh1 ·
Hi there,

I would like the post post_type (https://www.instrumentrentalbarcelona.com/?post_type=post) to display if someone goes to https://www.instrumentrentalbarcelona.com/blog. I have created rewrite in .htaccess and it is redirecting to /blog however it is giving me a 404.

This is it including the rest of my rewrites:

#Single URL Rewrite
RewriteCond %{QUERY_STRING} ^post_type=post$
RewriteRule ^$ /blog [QSD,R,L]

#http www rewrite
RewriteCond %{HTTP_HOST} ^instrumentrentalbarcelona.com [NC]
RewriteRule ^(.*)$ https://www.instrumentrentalbarcelona.com/$1 [L,R=301,NC]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress


This is what you see when you go to the post post_type: https://www.screencast.com/t/ofJlpsGN6fNb (currently redirects to /blog and shows 404)

Probably something real simple. Any advice would be greatly appreciated?

Best,
Sascha
0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Web Development Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums