0

I have a URL that looks like this:

va_article.php?id=296&startRow=10#top

I still need to request the information in the query string, but I want it to display like this in the address bar:

va_article.php

I've done some straight 301 redirects and re-writes using IIRF with good results. However, I haven't done much with the rewrite conditions. Might I need some rewrite conditions for this to work and if so, which ones?

Thanks,

post.72
  • 333
  • 4
  • 14

1 Answers1

0

Except if you're willing to hide the information elsewhere (cookie, which I wouldn't do!), this is not possible.

You will at least have to include that information into the url path somewhere, for example:

/296/10/va_article.php

Typically, you may do something like:

/articles/296/10
/articles/296?start=10

You'd need then 2 rules:

  • One rule to redirect old urls to news urls
  • One rule to rewrite new url to internal url

Similar to those two rules:

RedirectRule ^/va_article.php?id=(\d+)&startRow=(\d+)$ /articles/$1/$3 [I,R=302]
RewriteRule ^articles/(\d+)/(\d+)$ /va_article.php?id=$1&startRow=$2 [I,L]
marapet
  • 54,856
  • 12
  • 170
  • 184