Wordpress URL unexpected redirection - wordpress

My site URL is : http://abcd.com/index.php
I don't understand why, when I am opening :
http://abcd.com/index.php/welcome/ I am redirected to :
http://abcd.com/welcome/
which doesn't exist and displays a 404
My .htaccess is :
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /index.php/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php/index.php [L]
</IfModule>
# END WordPress
What do you think is wrong ?
Regards,

I had used a permalink structure like /index.php/%postname%/
and it was working, but the other formats no.
I made the other permalink format works by changing my config in my virtualhost, adding the default wordpress .htaccess content. restarted apache, my permalinks worked as well as all the other stuff...
10hours of pain

Related

WordPress Permalinks only work with index.php in the URL

When I try to change my WordPress Permalink settings, links to posts and pages return a 404 page. I have found the only way to get them to work is to either use Plain permalinks or to include /index.php/ in my permalink url, like domain.com/index.php/postname. How can I get them to work without index.php being part of the URL?
My .htaccess is below, and I have also used the .htaccess suggested at https://wordpress.org/support/article/using-permalinks/#creating-and-editing-htaccess, but changes to the permalinks puts the code below back into the htaccess file. Mod_rewrite is enabled on my Apache server.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress

wordpress The requested URL was not found

When i set plain permalink to post name permalink then page url is not found.
How can i solve this ?
Have you checked your .htaccess file , if you are using permalink rather than default then their should be a .htaccess file with the following code.
# 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
Wordpress will add this by default but may be in some case that may be a permission issue or some server configuration , you have to add by manually.
You can read more about wordpress .htaccess file Click Here

Page not found in wordpress localhost

I have installed Wordpress on my localhost, no links are working. I get page not found.
What can I do ?
Using .htaccess like:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /akclinics/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /akclinics/ [L]
</IfModule>
# END WordPress
If you not able to go /wp-admin just open your database then
Your database-> wp-options table->wp-options->site-url->check and change it.
After Follow this steps once:
This may be caused by the permalink or .htaccess
Go to settings-> permalink-> set it as default ->Reload or refresh
Then again now Go to settings-> permalink->postname
Your .htaccess will get update with the permalink.

Some WordPress permalink problems, probably depending by wrong .htaccess configuration?

I have import on my local webserver a backup of a website made using WordPress but I am finding some difficulties with PermaLink configuration
The main problem is that if I use the permalink setted as Article Name I can see the homepage but if I click on the articles links into the homepage (to see the article) I always obtain the following message error:
Not Found
The requested URL
/wordpress35/2012/10/11/se-milano-avesse-il-mare-anzi-no-la-montagna-di-campiglio/
was not found on this server.
If I instead I use the Default settings for permalink (http://localhost/wordpress35/?p=123) I have no problem and I can access to the articles in my website
I think that this is a .htaccess problem. Can you help me to create an .htaccess file that solve this problem?
My actual .htaccess file is:
# 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 need to use the URL format described as: http://localhost/wordpress35/my-article-name
Did you try creating a the wordpress .htaccess for your needs?
# 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
This should work if you didn't specify any change in the website's URL.
(If the homepage is still http://localhost/wordpress35/ )

Wordpress - pages stopped working - permalink issues?

I developed a simple wordpress site for a company.
Today they called me and said that some of the pages can't be visited.
So i checked it out , and seems like 3 menu options for apparent reason just stopped working. They said they haven't done any changes.
http://oi40.tinypic.com/ofqcev.jpg
Check the permalink it says says "projektledning" like it should be , and wordpress refuses to find the page.
http://oi40.tinypic.com/16h9mcg.jpg
And i tried for no reason to change the permalink and i've added "-1" to the link and bam its working...
What should i do to make the permalink work as the regular name it should be?
Try toggle permalink once under admin - settings - permalinks. Make sure you're server has write access to your .htaccess file before doing this.
.htaccess should look this:
# 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
At the last row, make sure there's a space between . and /
Also check your permalinks for any typos (spaces).
IF your url is foo.bar/something, make your .htaccess look like:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /something/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /something/index.php [L]
</IfModule>
# END WordPress
Hope this helps!

Resources