If the “myblog” portion of the URL is uneditable, then it is the name of the folder in which WordPress is installed.
Renaming the folder to something you find more acceptable could solve your problem. Do not simply change the name of the folder! Doing so will break large portions of your site.
If you rename the folder to “WordPress”,
Then the urls will change from:
mywebiste.tld/myblog/OutOfBlog/subcategoryname/(+postname
to:
mywebiste.tld/WordPress/OutOfBlog/subcategoryname/(+postname)
The directions for moving your blog to another folder can be found here: Moving WordPress
]]>There are already topics in this forum about changing the permalink for one specific category, but the suggested solutions use php – Rewrite API, but I assumed it would be quicker to do this in .htaccess ; besides, in the .htacess, there’s an instrucion of basename with “myblog” (It seems to me it’s unnecessary because it’s the same as the folder name ) and I suppose I should neutralize this.
Anyway, it seems to me that what I need is .htacess instructions like :
RewriteCond %{REQUEST_URI} “the already rewritten url contains OutOfBlog”
or “?id_category=x (?, I don’t know the url structure for one cateogry archive page)”
RewriteRule “Rewrite the url to mywebiste.tld/subcategoryname/(+postname) by skipping the basename ‘myblog'”.
But maybe I might as well do this with Rewrite API…
Or I should be doing this with the .htaccess in the root folder – parent folder of “myblog”…
The difference between writing directly to .htaccess and utilizing the php rewrite api depends on the scale of your site, and how many redirects you wish to create.
If you are only moving over one category, I would suggest using the method you feel most comfortable with. You seem to have done a bit of research already. Remember to make back ups, and read up-to-date documentation.
Finally, the category queries are:
?cat=4,5,6
?category_name=CMS
?tag=wordpress
]]>
RewriteRule ^subcategoryname/(.*)$ myblog/OutOfBlog/subcategoryname/$1 [L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /myblog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /myblog/index.php [L]
</IfModule>
How can I do this ??
First, should I remove RewriteBase /myblog/ ? Anyway, it’s the name of the physical folderwhere WP is insalled, but I’m a bit afraid to do this.