开发者

Serious url rewrite problem

开发者 https://www.devze.com 2023-02-20 16:17 出处:网络
i am using this rewrite rule on one of my website it works well, but i have been trying to use it on another website but it has not been working (the two website uses similar url structure)

i am using this rewrite rule on one of my website it works well, but i have been trying to use it on another website but it has not been working (the two website uses similar url structure)

shows page not on server

url rewrite details:

<IfModule mod_rewrite.c>
Options +FollowSymlinks
Options -Multiviews
RewriteEngine on
RewriteBase /
RewriteRule ^view/([^/]+)/([^/]+)/$ view.php?id=$1&title=$2 [L]
RewriteRule ^view/([^/]+)/([^/]+)$ view.php?id=$1&开发者_高级运维amp;title=$2 [L]
</IfModule>

this is the link ' http://address.com/view/1/honda-accord-ivtec-2011 ' want to rewrite to http://address.com/view.php?id=1&title=honda-accord-ivtec-2011

Please what am i not getting right

Thanks


Maybe the rewrite module is not set on your Apache server. Try this in command line with Debian:

ln -s /etc/apache2/mods-available/rewrite.load  /etc/apache2/mods-enabled/rewrite.load

Or this with Ubuntu:

sudo ln -s /etc/apache2/mods-available/rewrite.load  /etc/apache2/mods-enabled/rewrite.load
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号