草庐IT

mod_diff

全部标签

mod-rewrite php to html url not indexed

我目前在我的.htaccess文件中使用Rewriterule将我网站上的每个.php页面更改为.html。我也用它来改变搜索结果页面从www.example.com/search_page.php?city=name&state=name&id=1234类似于www.example.com/result-google-friendly-url-1234.html一切正常,但当我进行更改时,谷歌现在只索引我的索引页。我认为这可能与我在同一页面上有2个url而google决定不对其中任何一个建立索引这一事实有关。谷歌网站管理员说有16个页面“未选择”,然后说这可能归因于“规范化”,我不完

.htaccess - mod重写删除分页重复内容

我有重复内容的问题...我的链接是这样的:原创:www.example.ro/men-shoes/复制:www.example.ro/men-shoes/pagina-1/原创www.example.ro/women-shoes/复制:www.example.ro/women-shoes/pagina-1/和其他以/pagina-1/结尾的类似页面我不擅长mod重写..但我试过这段代码RewriteCond%{QUERY_STRING}^pagina-1/$RewriteRule^(.*)$1[L,R=301]没用...我很乐意解决这个问题!谢谢! 最佳答案

apache - mod_rewrite 使用动态数字标识符更改单词

我想做的是重写URL中旧项目模块中的一些词,以便它们看起来适用于当前项目。我开始的URL是:http://WEBSITE.com/stories/topic/view/pet_id/6/topic_id/41我在.htaccess中的内容是:#ChangePetandTopictoStoryandChapterRewriteCondstories/topic/view/pet_id/([A-Za-z0-9-]+)/topic_id/RewriteRulestories/topic/view/pet_id/6/topic_id/.*$stories/chapter/view/story_

mod-rewrite - 为 SEO 重写单页模组

我有一个页面如下。www.mysite.com/about.php我希望将其设置在htaccess文件中,如下所示。www.mysite.com/my-keyword-here请帮帮我。提前致谢。山姆 最佳答案 将此添加到文档根目录中的htaccess文件中:RewriteEngineOnRewriteRule^/?my-keyword-here$/about.php[L]所以现在如果您在浏览器的URL地址栏中输入http://www.mysite.com/my-keyword-here,您将返回/about的内容。php.

.htaccess - 使用 mod_rewrite 将动态 URL 转换为 SEO 友好 URL ??

我不是PHP开发人员,我被要求执行一些SEO。这是我的.htaccessRewriteEngineOnRewriteBase/RewriteRule[_\]space.cgi[L]ErrorDocument404/errors/404.phpErrorDocument400/errors/badrequest.phpErrorDocument401/errors/authreqd.phpErrorDocument403/errors/forbid.phpErrorDocument500/errors/serverr.phpErrorDocument503/errors/ServiceU

url - mod_rewrite 和 "pretty urls"

我很遗憾地没有能力使用mod_rewrite来获得干净的、对SEO友好的url,但我真的下定决心要学习。我找到了各种在线教程,但似乎无法真正理解足够的信息来按照我喜欢的方式操作它。Ihaveahomepage:http://mysite.com/index.htmlwhichIwouldliketodisplayas:http://mysite.com/home同样,我有子目录:http://mysite.com/about/index.htmlhttp://mysite.com/contact/index.phpWhichIwouldliketodisplayashttp://mys

php - 在 mod 重写中忽略动态路径并保留子路径

我有一个带有动态路径的网站,我需要知道如何保留一部分或忽略它:动态路径的几个例子:http://www.example.com/185/seo-dynamic-field.htmlhttp://www.example.com/186/seo-dynamic-field2.html如您所见,seo-dynamic-field.html是从mysql生成的字段,仅用于友好的url。id(185&186)是处理真实查询字符串的真实ID:RewriteRule^/*(([^/]+)(.html))$index.php?id=$2[L]这是有效的:http://www.example.com/1

mod-rewrite - 修复编码 "http://"的 Apache URL 重写技巧

我有一些导致最终格式不正确的网站,例如:http://www.mydomain.com/directory/http%3A%2F%2Fwww.another.com%2Falink-that-doesnt-work我想要一个重写规则来截断该部分直到url并修复编码以重定向到http://www.another.com/alink-that-doesnt-work谢谢 最佳答案 使用正则表达式从URL中提取主机名和链接,并使用反向引用进行替换和重定向。请注意,模式与解码的URL相匹配。RewriteEngineOnRewriteRul

url - CMS 使简单的 Htaccess Mod_Rewrite 不起作用

我在我的CMSMadsimple1.7站点上使用Mod_Rewrite启用了“漂亮的URL”,它似乎工作正常,301重定向工作正常,大部分重写工作正常。但是,不是将URL更改为www.domain.com/page-title,而是将它们重写为www.domain.com/?page=page-title有人可以帮忙吗?!#BEGINOptionalsettings#Turnsoffdirectorybrowsing#notabsolutelyessential,butkeepspeoplefromsnoopingaroundwithout#needingemptyindex.html

.htaccess - 301重定向与mod_rewrite

我的网站上有一些SEO要做。我希望“red-bags”页面指向搜索页面“search.php?keyword=redbags”此外,我希望旧的搜索页面对新的红包进行301重定向。RewriteBase/RewriteRule^red-bags/search\.php/keyword=red\sbags[NC,L]RewriteCond%{QUERY_STRING}keyword=red\sbagsRewriteRule^search.phphttp://www.mysite.com/red-bags[R=301,L]第二条规则不起作用。请帮忙。 最佳答案