Welcome Guest, Not a member yet? Register   Sign In
.htaccess RewriteRule question/problem
#1

[eluser]Unknown[/eluser]
Hi there,

I hope you could help me.

I try to realize the following redirects via htaccess.

Input 1 = xy_com/blog/ -> Should direct to xy_com/blog.php
Input 2 = xy_com/blog/blog-entry-1 -> Should redirect to xy_com/blogdetail.php?id=1

Ive made the following entries in .htaccess

RewriteRule blog/ blog.php
RewriteRule blog/(.+)-([0-9]+)$ blogdetail.php?$2


Input 1 works fine but Input 2 always leads to xy_com/blog.php also :-(

What´s going wrong? How can I define that rule 1 should only work for /blog/ only?

BR and thanks for your help !!!

Anja




Theme © iAndrew 2016 - Forum software by © MyBB