Home wordpress custom Rewrite rule in htaccess
Reply: 0

wordpress custom Rewrite rule in htaccess

NorteAmaru
1#
NorteAmaru Published in 2018-02-12 18:29:13Z

In my options-permalink.php i have a Custom Structure like http://myexamplesite.com/%category%/%postname%.html

My .htaccess:

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

</IfModule>

So the question: i need use RewriteRule fore some specified posts. For example if i typing in browser http://myexamplesite.com/spec1.html i have to see url http://myexamplesite.com/category1/mycustompost.html without redirect to this page.

Why my RewriteRule shows 404 error?

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

RewriteRule ^spec1.html /category1/mycustompost.html [L,QSA]
RewriteRule ^spec2.html /category2/mycustompost2.html [L,QSA]

</IfModule>

Thanks for answers!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.329652 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO