Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Tuesday, April 28, 2020

htaccess 301 redirect from one pages to another page

htaccess 301 redirect from one pages to another page

301 Redirect from page1 to page2

please use the below code in the htaccess file:

RewriteEngine On
Redirect 301 /page1/ /page2/
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Saturday, January 13, 2018

Wordpress - The requested URL /page/ was not found on this server.

How to fix The requested URL was not found on this server error for the hello/name url?

This error is due to the rewrite module and this is the .htaccess file error, please update the .htaccess file with the following code:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
For more information, please visit the wordpress codex - https://codex.wordpress.org/htaccess