dsk95913 2013-06-27 14:32
浏览 20
已采纳

SEO友好.htaccess总是引导我到主页

I have problem with seo friendly url. I've try to change my url with .htaccess and off course I have problem.

My link in header for my contact page is like this:

index.php?=contact

So I wrote rules in .htaccess like this:

Options +FollowSymLinks

RewriteEngine On
RewriteRule ^contact index.php?=contact

And off course changed my link in header to be like this:

contact

And now when I click on contact on header I get nice url like this:

www.mywebsite.com/contact

But website lead me always to home page (index.php).

What I did wrong?

  • 写回答

2条回答 默认 最新

  • duandi8613 2013-06-29 19:26
    关注

    I made this clear, and now working. I just changed link, and put page. Static link working now for me, but how to write to dinamic link. For instance, my link is like this:

    <a href=index.php?page=kategorije/$row[id_cat]/$newname>{$row['name']}</a>
    

    $newname give "-" instead empty space between words.

    And this kind of link give me this url:

    www.mywebsite.com/index.php?page=category/3/The-Name-Of-Shop
    

    How to write .htaccess to get:

    www.mywebsite.com/The-Name-Of-Shop
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据