Forum Moderators: phranque
apologies in advance, I have looked at tutorials and examples but cant seem to get this to work! Hoping a kind soul on here can lend a few brain cells.
I have wordpress installation which is situated in a /blog/ folder, with a homepage at the root.
We have some wordpress "pages" which are displayed as static content. Currently, the URL to these pages is oursite.com/blog/portfolio.
What we want is for these pages to have a url like oursite.com/portfolio, i.e take out the /blog/ bit.
I have tried to adapt the current .htaccess file but with no success. Here is what I have so far:
<IfModule mod_rewrite.c>
RewriteEngine OnRewriteBase /
RewriteCond %{REQUEST_URI}!^blog/portfolio
RewriteRule ^portfolio$ blog/portfolio
# original wordpress generated bit below:
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /blog/index.php [L]
</IfModule>
Any help much appreciated!
Thanks
A.
I assume that you mean, "What we want is for these pages to have a url like oursite.com/portfolio/<something>"
RewriteRule ^portfolio(/.*)?$ /blog/portfolio$1 [L]
Now modify your blog to produce on-page links to "/portfolio/<something>, and combined with that RewriteRule, you'll get the results you want.
Jim