0
網頁目前,我有這樣的:重定向到
redirect 301 ^/about/ /about.html
redirect 301 ^/about/skills/ /skills.html
redirect 301 ^/about/experience/ /experience.html
redirect 301 ^/about/projects/ /projects.html
我想重定向到/about/
about.html
,/about/skills/
到/skills.html
但上面redirect
■不要工作,仍然要/about/
應該是我的redirect 301
是?
注意這些的低於我的重定向:
# Protect application and system files from being viewed
RewriteRule ^(system) - [F,L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
還有一個問題。 '/ about'沒有被重定向。只有'/ about /'是。我會做些什麼來包含'/ about'? – 2012-01-19 02:01:00
我做的一個快速修復是'^(/ about/| about)$ /about.html [NC,R = 301,L]'但還有更好的方法嗎? – 2012-01-19 02:04:33
@ThorpeObazee使尾部斜線可選使用'?'即'^ about /?$ /about.html [NC,R = 301,L]' – 2012-01-19 02:42:36