问题原文
原帖链接 · Bass Jobsen · CC BY-SA 4.0
On a website i use mod_rewrite and PHP to create clean URL's.
My .htaccess (summary) will look like that shown below:
RewriteEngine On
#oude pagina's
RewriteRule ^nl/links/(.*)/index.php$ /nl/links/$1/ [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-zA-Z]{2}/[a-zA-Z0-9/\-_]+)/$ /index.php?navid=$1&%{QUERY_STRING} [L]
When using a browser the above seems to work well
/nl/links/eropuit/vakantie/rondreizen/ shows the right content, and /nl/links/eropuit/vakantie/rondreizen/index.php redirects to /nl/links/eropuit/vakantie/rondreizen/
But when i take a look at the most visited pages at Google Adsense (Analytics), it tells me a index.php is found for every URL:
Now I wonder why that index.php is found / detected and whether I should worry about it.
已采纳解答
原帖链接 · Reve · CC BY-SA 4.0
Google Analytics provides a way to add a filename to any page path ending with a slash, in order to standardize data for pages that might be accessible with or without the filename. Look in Admin > View Settings for the Default Page field, right underneath time zone. An index.php in that field is your reason!
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
