Not sure if there is an easy way to do this.
I'm trying to make it so "site.com/?page_id=7" can be linked as "site.com/7". I know that with slugs you can make it look like "site.com/?page_id=testtitle" or whatever, but I was wondering if there was an easy way to make it show up without the "?page_id=" part.
My guess is the only way to do this is create a directory for each page, and put in a header redirect in the htaccess of the directory to link to "site.com/?page_id=7".
Any ideas?
Thanks.
Enable permalinks on your site and you will be able to access your pages as; site.com/<page-slug>. That makes it eaiser to find for your visitors than site.com/7 or site.com/9..
Regards
You could write your own mod_rewrite rule..
Or have WP do it for you. :)
You just saved me a boatload of time ;)
Quick question though...
when WP is referring to the .htaccess file, is it the htaccess file for the domain, or the htaccess for the server root?
Well that depends on your server structure I guess. Some hosts allow you to have multiple fully-hosted domain within a single account, in that case WP will be playing with the .htaccess that pertains to the domain on which it is installed.
Regards
It seems something got messed up here too...
In my links bar (that links to the catagories) it automatically prefixes the links with /catagory/ so the links that should show up as "site.com/cat-name" show up as "site.com/catagory/cat-name" and I can't find anywhere to change this...
Weird. Anyone know what is causing this?
Thanks a lot.
What is your permalinks structure? That's where /category/ is usually coming from.
Regards
Uh oh...
I can't create new pages anymore either. Well, I can create them but when I go to them it says "Sorry, no posts matched your criteria."
The permalinks structure is "/%postname%". That's it.
For creating new Pages and being able to use the permalinks with them your .htaccess file has to be writeable ALL the time, so WP can write the new rules into it every time you create a new Page.
Moshu, it is writtable: 666.
I also see that it IS writting to the htaccess....
Odd.
Ok, I can create pages again.....though I still am getting that extra "/catagory/" before links.
Bump....
Any advice on this?
Thanks.
Why don't you read what is there on the Permalink settings page?
If you like, you may enter a custom prefix for your category URIs here. For example, /taxonomy/categorias would make your category links like http://example.org/taxonomy/categorias/uncategorized/. If you leave this blank the default will be used.
The default for categories is - "category" :)
Yes, I did read that but what if I don't want any sub-directory? I assumed I would leave it blank...
Anyone know what's up?
Thanks.