Blog.php or how to display recent posts?
Don’t use home.php for static home page, use front-page.php or any other page template instead. Also see Codex page for Creating a Static Front Page
Don’t use home.php for static home page, use front-page.php or any other page template instead. Also see Codex page for Creating a Static Front Page
For the sake of clarity, this should be your .htaccess RewriteEngine On RewriteBase /zingery/wordpress/ RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /zingery/wordpress/index.php [L]
It was a server missconfiguration in httpd.conf: <Directory /> AllowOverride None </Directory> had to be changed in AllowOverride All. I should have realized this sooner, but it eluded me since I thought the override was working on the main installation, but it wasn’t. I didn’t notice it, because it was a one-page website. Once I … Read more
WordPress tries to detect the webserver’s type by peeking into the global $_SERVER[‘SERVER_SOFTWARE’] variable. The Apache check is: $is_apache = (strpos($_SERVER[‘SERVER_SOFTWARE’], ‘Apache’) !== false || strpos($_SERVER[‘SERVER_SOFTWARE’], ‘LiteSpeed’) !== false); and the Nginx check is: $is_nginx = (strpos($_SERVER[‘SERVER_SOFTWARE’], ‘nginx’) !== false); You should therefore first check out: var_dump( $_SERVER[‘SERVER_SOFTWARE’] ); to see if it’s correct. Here … Read more
The question is about doing this with .htaccess, but why not disabling author pages from within WordPress instead? This would achieve the same result while making the subdirectory concern irrelevant altogether (and also works regardless of permalink structure settings) Sample code that sets all urls to author pages to a 404 error: add_action( ‘template_redirect’, function() … Read more
Here are a couple of options: WP htaccess Control – will let you manually edit your .htaccess file All-in-one htaccess Plugin – will let you dynamically create an .htaccess file based on which modules/features you want set up When all else fails, turn to Google …
If you are using any CDN service like Cloudflare, then you can use the forwarding URL feature I mean you can set this rule: *example.com/* https://www.example.com/$2 this way, the HTTPS and www will be added to all URLs, this can be handled via web server too, but using a CDN service, will reduce the load … Read more
Here is what I have in my own .htaccess file that does what you’re looking for: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On Options +FollowSymLinks RewriteBase / RewriteRule ^index\.php$ – [L] RewriteRule ^example.html$ /wp-content/raw/example.html [L] RewriteRule ^download$ /wp-content/raw/download-ebook.html [L] RewriteRule ^thanks$ /wp-content/raw/book-opt-in-thank-you.html [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # … Read more
By creating a physical directory the same as a (virtual) WordPress URL you have created a conflict. The URL needs to be routed through WP, but the default front-controller (the .htaccess code shown above) specifically excludes physical directories from being rewritten. The 403 Forbidden error comes about because you don’t have a directory index document … Read more
it opens the site in the domain Have you tested inner pages, not just the homepage? A seeming inconsistency in your config is that you have defined DocumentRoot /var/www/html/10_sites/ in your vHost(s) yet you have set RewriteBase /10_sites/ in your .htaccess file. Unless your site files are located in /var/www/html/10_sites/10_sites/ (yes, the last directory repeated … Read more