Password protect directory but not files

As far as I know, the few files that you are talking about are always going to be the same, that means you can add exceptions to your .htaccess and “let them go through the cracks”. With an example of code from what you wrote so far may help us direct you on how to … Read more

url rewrite .htaccess extension to permalink

This should work for you- function wpse28906_rewrites_init(){ add_rewrite_rule( ‘mypage/([^/]+)/?$’, ‘index.php?pagename=mypage&myslug=$matches[1]’, ‘top’ ); } add_action( ‘init’, ‘wpse28906_rewrites_init’ ); function wpse28906_query_vars( $query_vars ){ $query_vars[] = ‘myslug’; return $query_vars; } add_filter( ‘query_vars’, ‘wpse28906_query_vars’ ); You can then use get_query_var( ‘myslug’ ) in your template to get your slug value. Don’t forget to flush your rewrite rules after adding … Read more

Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard

You named the custom post type ‘custom_about_post’ not ‘about’. Rename the archive template to archive-custom_about_post.php or better: rename the post type. As a rule of thumb: Avoid underscores in post type names. There are/were some issues, especially with templates. And why do you need a custom post type just for about pages? What’s your goal?

Can’t access WP site over WiFi network

yes, it because wordpress use the server address from database get_option(‘siteurl’) and get_option(‘home’), so if you access the wordpress from IP Address the assets (js and css) will still loaded from localhost/wp/ that mean from 127.0.0.1 not the 10.0.0.1 the simple way to get dynamic url for your wordpress is defining the site_url and home_url … Read more

Is WordPress API visible from PHP file called in htaccess

The .htaccess is parsed before WordPress is loaded, so you don’t get access to WordPress data. You can make the redirect in WordPress, in a plugin: Hook into 404_template and inspect $_SERVER[‘REQUEST_URI’] with parse_url(). You should be able to find the matching post for the image then. You did not write how the permalinks for … Read more