我得到了它的名字後(http://exampleblog.com/dev/the-post-slug)的結構配置默認的WordPress的.htaccessWordPress的mod_rewrite的和自定義規則
這是的.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /dev/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /dev/index.php [L]
</IfModule>
# END WordPress
我需要什麼,在像http://exampleblog.com/dev/the-post-slug一個網址,我可以添加自己的sulfixes,如http://exampleblog.com/dev/the-post-slug/mydemo,我想指出的東西,現在是http://exampleblog.com/dev/wp-content/themes/the-theme/my-custom-folder
所以我需要訪問此URL http://exampleblog.com/dev/the-post-slug/mydemo到顯示此實補丁http://exampleblog.com/dev/wp-content/themes/the-theme/my-custom-folder的內容和我無法找到一個方法
感謝
作爲短代碼方法的附加優勢,用戶實際上可以在搜索中找到內容,而如果你使用.htaccess嘗試捕獲和重定向WordPress之外,它甚至不會知道這些頁面是否存在。 – ben 2012-08-06 09:11:00
如果我創建了一個mydemo的post-slug父項,它將打破Wordpress上的這個後期slu,,因爲路徑並不是真的存在。 關於您的其他建議,它不幸工作,因爲我希望這被谷歌索引http://exampleblog.com/dev/the-post-slug/mydemo 無論如何感謝 – steps 2012-08-06 09:51:55
這個插件可能有幫助:http ://wordpress.org/extend/plugins/rewrite-rules-inspector/ 或者你可以挖掘http://codex.wordpress.org/Class_Reference/WP_Rewrite,這將允許你直接通過WordPress添加重寫規則。 – ben 2012-08-06 12:00:41