Well I did a wordpress installation with the newer version now available at dere website..
I did my installation at a subdomain: foo.abc.com
the problem came with the permalink which do not work dere bec of the htaccess file.
Can any one suggest me how to do that, i need to have only the category/postname
Till now i am able to do foo.abc.com/index.php/category/postname - I don't want index.php in it.
I have used this htacess file:
# disable the rewrite engine
RewriteEngine on
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
RewriteRule ^post/([0-9]+)?/?([0-9]+)?/?$ /index.php?p=$1&page=$2 [QSA]
</IfModule>
# END WordPress
Please correct me if possible.
I'm not totally sure I understand the problem, but I'll try and throw out a few solutions.
In the Wordpress back-end, under the General Settings Tab- have you set the "Blog address (URL)" and "WordPress address (URL)" to the correct domain? This may write the correct .htaccess setting for you.
If you are trying to do something fancier with the domain such as category.blog.com/post_id, perhaps take a look at the WP Subdomains plugin.
Related
I am trying to redesign a website from a friend and it's chaotic as hell. Now I am stuck a bit.
The old domain it something like http://www.website.com/folder/
I am trying the get rid out of the "folder", so I changed the setting in the wordpress setting and the root in the web-provider. The whole website is working fine, also the Wordpress admin area. But if I'm trying to get into the "home" page, it won't load - or it is loading endlessly.
Do you have any idea how I could fix it?
Regards and thanks,
Natts
A piece often forgotten is the .htaccess file (found in the root of your WP install); I especially suspect it because you're going from a subfolder to no subfolder.
Back it up, then override it with the default WordPress values (or delete it and go to Settings -> Permalinks in WP Admin)
Default .htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I have moved wordpress site to production server from test server. I have done database, code configuration changes. The strange problem i am facing is if i call my website adding index.php then only it shows the site.
http://www.suziesellsaz.com/index.php
If i directly call using domain name it is not working
http://www.suziesellsaz.com
I have thought problem may be because of .htaccess so i have deleted .htacess and saved permalink and it creates following .htaccess but still no luck.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Can some one help me solving the issue?
Please check if under Settings > General settings
Both the urls i.e Wordpress Address and Site Address are same.
Last time I had this issue when they were different. Changing them and reseting permalink fixed this issue for me.
I am not sure about this but, Put your htaccess file back and
RewriteBase /
replace with this
RewriteBase /public_html/
and
RewriteRule . /index.php [L]
replace with this
RewriteRule . /public_html/index.php [L]
May be it's the problem of URL rewriting.
Add the below code in .htaccess file -
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Once done then please make sure that the site URL and home URL for your site are set correctly. You can update the site URL and home URL from wp_options table, WordPress configuration file or from the WordPress administration panel.
Once done then please clear the cache of your system and try to access the website.
Let us know how you go.
Thanks to all of you for your valuable help and inputs. I struggled a lot on this issue and able to find the solution following these steps. Hope it will help some like me.
# Always use domain name in lower case.
In my case client domain is "SuzieSellsAZ.com" treat it as "suziesellsaz.com" all lower case.
Use Database Search and Replace Script in PHP to replace all occurence of previous domain.
ref:
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Update the siteurl and home URL in database options table and all other occurrence in the database.
Once it done or database update then you should import to any server and it will works fine.
Sometime site post or page URL does not work then go to setting > permalinks and save it. Site post and page URL will work fine.
I have installed a test blog on RichBloggers Domain. I am trying to use permalinks. With My current settings as follow
The site links works but with query string in url like
But when I change the setting to post name
My Links give me error
Here is my .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
What am I missing?
Finally I figured it out. The Hosting Server I am using has old Plesk on it and doesn't have cPanel so the PHP version is outdated. URL rewrite is not working because Mod_rewrite is not enabled.
check by deactivating other plugins once and check by setting theme from WordPress default theme.
and then by setting permalink again.
check if this issue still coming. otherwise it will be conflict issue.
Simple click again the permalinks post name radio button and save it, it will solve your problem now.
Check if the category exist if not then it would throw that error.
I have a VPS with LAMP installed, on which I run several websites, each of them redirected via CNAME to a subfolder /domain.com/htdocs.
One of these websites is a wordpress. I'm trying to activate permalinks for my pages. Following the directions of this tutorial I've tried to modify the config of the apache2/sites-available/domain.com file to change the AllowOverride None to AllowOverride All.
I'm still getting the same 404 error :
The requested URL /page-name/ was not found on this server.
I've checked on my FTP, my .htaccess file exists and has the correct permalink redirect:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
The only way I've managed to activate permalinks is by putting index.php/ before it:
mywebsite.com/index.php/page-name/
Any idea on how to fix this? Would be immensely grateful, I've been trying to make this work for hours now!
Thanks in advance,
Arthur
Solved it myself. I just needed to load the mod_rewrite module with the command a2enmod rewrite.
Hope that'll help someone!
i have been writing .htaccess for the site http://hoteldevserver.com/~hamislan/ when i can the permalink to /%postname%/ its shows the following error when try to view the page.
The requested URL /~hamislan/info/services-amenities/ was not found on
this server. Additionally, a 404 Not Found error was encountered while
trying to use an ErrorDocument to handle the request.
i have my .htaccess file as
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
i have my wordpress file directly in www
Tthis could be one of a few things.
First check that your htaccess is readable by apache. I'm assuming it is.
Then check that you have mod-rewrite enabled in apache.
Lastly, it could be this symlink issue. And to fix this, you can add this to the top of your htaccess file or your can enable it in your vhost directive (I'm just assuming you're using a vhost) Sorry I don't have an example of how to do it in the vhost off the top of my head.
Options +FollowSymlinks
Also each time set your permalinks to the default and then switch it to the permalink style you want.
EDIT
Additionally, the url location of your website is not at the base http://hoteldevserver.com/~hamislan/
So you may need to edit your rewrite rule for base url. It's call RewriteBase
Right now RewriteBase is / you may need to change that to /~hamislan/