is site cloaking possible with a .htaccess file - wordpress

i have created a wordpress site within a folder on a site and am having trouble moving the database so was looking in to ways of cloaking the sites url on every page with a .htaccess file. at the moment the site is a beta at www.christopherwaller.com. I wanted to look into removing the ugly URLS with page-id etc....
Does anyone know if this is possible. or if the .htaccess file is not the way to go
much appreciated
N

You can use the build in wordpress features, have a look at Permalinks

If your trying to change from
http://www.christopherwaller.com/wordpress/?page_id=240
to
http://www.christopherwaller.com/wordpress/about
Just navigate to your admin control panel, click on Configuration on the left menu, and then on Permalinks.
Fill the 'Custom' field with /%postname% and the links should appear as your expect.

Related

How to get sub-domain of Wordpress in url structure

I have created a Wordpress install on a sub-domain of my server. So for example my url is www.myUrl.com and I created a subdomain that is essentially www.myUrl.com/sub. I installed Wordpress on www.myUrl.com/sub and it works fine.
The site shows up on that new url as it should BUT when I click a link, lets say 'blog', instead of taking me to www.myUrl.com/sub/blog it takes me to www.myUrl.com/blog.
I am pretty new to wordpress and have looked up the issue but can't find any answers. I have messed with the absolute path stuff inside the .wp-config file but cant' figure out what to do and if this is indeed the file I need to change. I have also tried to find this on the permalinks page.
Please let me know what other information you need to help me answer this question and thanks in advance.
It looks like your home URL is defined as "www.myUrl.com" in the database. U can find this in the wp-options table in the database or in WordPress at the general settings. When I move to a subdomain I also delete the .htaccess and save the permalinks page of the settings so the .htaccess gets a refresh.

wordpress .htaccess & .htpasswd issue

I have a strange issue here. My client site is suspended due to spam messages by one.com. After deleting the comments, the technical support guy told me to generate .htaccess and .htpasswd file by using one.com's support page and upload it into root. Deleted old files and uploaded the new files a per the supporting guy. But site shown an internal error, then the technical guy said 'delete' both files and try. Then the home page is loading but inner pages showing 404 error.
Anyone here have a solution for this? this is the site http://www.jayabhattacharjirose.com/
Thanks in Advance
This is a problem with permalinks. Try the one of the following three solutions.
1: Set your Permalinks back to default, if things start working as expected then try re-setting Permalinks back to what you want.
2: Try going in your Dashboard to Settings > Permalinks. You don't need to change anything on the Permalinks page, but just click Save Changes at the bottom. Then check your site to see if that fixed it.
3: Try changing options on the Permalinks page if you want to change the way the URL looks from p=### to the /date/page format or others.
Reset your permalink to default and then again set it your required permalink structure so that WordPress creates a new required .htaccess file for it.
And if you have backup of your project then try to use the old .htaccess file.

wordpress theme doesn't appear

I'm having a very basic problem: I'm trying to create a new theme for a wordpress installation locally on my computer.
I've created a styles.css and index.php file and put it in a folder in wp-content/themes. But it doesn't appear in the Wordpress themes page.
As a test, I made a change to the description of one of the existing themes (Twenty-Ten) in its style.css, and refresh the Wordpress themes page, but the old description continues to be shown. This suggests to me that I'm simply using the wrong folder, but that's not possible! Any ideas on this problem much appreciated.
UPDATE: In fact, even when I delete Twenty Ten from the Themes folder, it's still available as an option in the Wordpress backend, and I can activate it... Very strange...
G
I agree with your diagnosis. You are either looking at the wrong folder or in fact the wrong computer. There's no other way that you could change the theme to one that has been deleted.
I suggest that you confirm you are in the same universe you think you are in. Create a simple file localserver.txt in your WordPress directory and then confirm that you can access that file.
If you can't, you have your answer. You are somehow accessing a different location.
If you can access that text file, you need to go further and look to see if something like the site url setting is redirecting you to the live site, without you realizing it, when you access wp-admin.
Beyond that, I'd need to know more about your setup. Something like having www.example.com in your /etc/host file and not example.com can cause similar confusion...
Are you using Wordpress Multisite?
In that case you have to 'enable' that theme in the Network admin manager

WordPress with Yahoo! Hosting... Almost there

EDIT:
Yeah, so this problem is really unsolvable. Yahoo prevents access to .htaccess, even from WordPress itself trying to change it. I had to settle for writing a script on the default homepage that redirects browsers to "www.abc.com/index.php" if they go straight to "www.abc.com". You always have to deal with "index.php" being in the address bar but it's better than not having permalinks...
/EDIT
Yahoo! Small Business hosting seems specifically engineered to make WordPress difficult-- but it's my client's host and there's not much I can do about it. I'm trying to move WordPress into the root directory, and I'm sooo close to having it done.
I've read and read and read about how to get the Permalinks to work right, and since Yahoo! hosting doesn't let you modify htaccess I am pretty much up s*** creek. I'm using the simple permalink structure of "/%postname%/", which once I moved to the root, stopped working. I have changed it to "/index.php/%postname%/", which allows you to see the pages if you manually type in index.php before the page name or if you are logged into the admin area and "View Page". Also, the correct permalink shows on all of the pages in the editor.
However, WordPress doesn't let you change the permalink of the static page you use as the front page.
Long story short, if I go to "www.abc.com/index.php", the links in the menu all work fine. However, if I just got to "www.abc.com", the links don't pick up the "index.php" from the permalink structure. I need to fix this, so if anyone knows how to either:
Change the permalink of the static front page
Fix something in the database if I install PhpMyAdmin
Work around not having access to .htaccess
Put a small script somewhere on the index page to append "index.php" to the url
Any other suggestions
It seems it would work if I was NOT using a static front page but rather the blog, but this isn't an option. I've tried changing the "Tag base" setting to no avail, as well as deactivating the Yahoo! Custom Permalinks plugin (and reactivating it again after that failed...). Could really use some help!
Check out Giving Wordpress its own directory. I can see how this could solve your problem. Also make sure that you have done the obvious, and change your url for WordPress address (URL) Site address (URL) inside the general settings page. Perhaps the static homepage should be developed outside of wordpress, and then you can follow the steps provided in the link I provided. Hope this solves your issue.
Yahoo doesn't allow users access to the htaccess file which means that you can't the mod_rewrite rules needed for custom permlinks. The Only way around it that i've heard it works (never tried it myself) is to add /index.php/ to the beginning of your custom structure so: Go to Permalink Settings > Select Custom Structure. And set the value as /index.php/%postname%/ or what ever you want as long as you add /index.php/ before it.
Hope this helps.
I had a similar problem with this host (in 2018! 4 years after your question) that I finally solved by changing the permalink settings.
Settings > Permalink Settings > Custom Structure: /index.php/%postname%/
I wish there was a better solution but Yahoo Small Business still doesn't allow .htaccess files - after several frustrating rounds with customer service, I finally admitted defeat and used this work around.

remove /blog sub from wordpress permalinks

Any idea? Im using wordpress as a CMS (not a blog) and I would like to change the default "blog" subdirectory in something like "news".
Thanks
WP Version 3
This probably means you've installed workpress in the yoursite.com/blog directory - for example, if you ftp into your site, you'll see the / folder listed, which is the base directory of your site. Anything in this folder will be served as yoursite.com/somefile.html. However, installing wordpress in the /blog directory means everything served from wordpress will look like yoursite.com/blog/wp-admin, for example.
If you change the name of that subdirectory to news, that would solve your problem. Keep in mind, however, that some things inside wordpress will be configured to use that blog directory as the home directory, and simply renaming it might cause unexpected problems.
Hope this helps.
PS - if you actually point us at your site, or give a little bit more technical information about your directory structure, we might be able to help more specifically.
Find a way to rename the "blog" directory, where you installed WordPress to.
a. One way could be an FTP client you're using.
b. Another way could be the File Manager in your web host's control panel.
But DO NOT RENAME IT YET.
Log in to your WordPress Dashboard.
Go to "Settings > General" in the left set of options.
Change "WordPress address (URL)" from "http://yourdomain/blog" to "http://yourdomain/news"
(Don't hit "Save Changes" yet...)
Make a similar change to "Site address (URL)"
Click "Save Changes"
Go rename the "blog" directory to "news"
Now visit your site and see what happens.
If you have already added posts with images and such, there will be links in your posts that contain the old "/blog/" part of your path. You will need to update those posts.
Good luck.
Paul
There is a plugin named "Custom Taxonomies". You can use it.
http://wordpress.org/extend/plugins/custom-taxonomies/
You can do it from .htaccess adding this:
RewriteRule ^index\.php/blog/(.+)$ http://www.example.com/index.php/news/$1 [R=301,L]

Resources