nginx – permalinks with .php in url not working

I ended up changing location ~ ^/.*\.php$ { try_files $uri = 404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } to location ~ ^/.*\.php$ { try_files $uri $uri/ /index.php?$args; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } It now works, but I feel that is a security issue now.

Why does WP not use relative links when linking pages?

Your question seems to have been already answered by a user here: https://stackoverflow.com/a/18516783/844732 However it sounds like your problem would be solved by using this plugin: Relative URL Relative URL applies wp_make_link_relative function to links to convert them to relative URLs. Yoast also has some background on relative URLs.

Replace WordPress %postname% suffix with %postid%?

I suppose you could filter wp_unique_post_slug and have it return the original slug for posts, but I’m not sure what kind of side-effects this may have: add_filter( ‘wp_unique_post_slug’, function( $slug, $post_id, $post_status, $post_type, $post_parent, $original_slug ) { if ( $post_type == ‘post’ ) $slug = $original_slug; return $slug; }, 10, 6 ); And here’s how … Read more

Changing Permalinks to a Custom Permalink causes a 404 Error [no matter what I do]

…remove the <IfModule mod_rewrite.c> wrapper? Or include RewriteEngine On at the top of the .htaccess file, above the <IfModule> wrapper? : @MrWhite Tried it, still get a internal error. That indicates that you don’t have mod_rewrite installed on your server or you are not permitted to use mod_rewrite in .htaccess files (see the AllowOverride directives … Read more

Custom permalink structure with a prefix just for posts

There are different ways to achieve this result, I used pre_post_link and post_rewrite_rules filter hooks. You can use eg. generate_rewrite_rules hook, but with post_rewrite_rules, you can easily change permalinks not only to the post but also to its comments, attachments, etc. Original permalinks you can keep or replace with new ones. After adding the following … Read more

Without index.php in permalinks I get 404 across site

Adding junk doesn’t do anything either. That suggests your .htaccess file is not being processed at all. You need to set AllowOverride All in the appropriate <Directory> container in the main server config (or <VirtualHost> container) to enable the parsing of per-directory .htaccess files (to allow .htaccess directives to override the server config). The FollowSymLinks … Read more

Why does WordPress Pagination Remove the Spaces from my GET Variable?

Not sure exactly how you’re adding “find” to the list of query variables, but this is the method you’re supposed to use: function wpa_20565_query_vars( $public_vars ) { $public_vars[] = ‘find’; return $public_vars; } add_filter( ‘query_vars’, ‘wpa_20565_query_vars’ ); I use that to add custom pagination for my custom post types and custom filters for various other … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)