- Where Developers Learn, Share, & Build Careers


On my blog (which I am in the process of redesigning content in a more efficient way), I have

From http://new.kn3rdmeister.com/blog.php

to handle a simple redirection

RewriteRule setup for http://new.kn3rdmeister.com/category/blog/ (And also works backwards too)

In .htaccess:

  RewriteEngine On RewriteRule ^ blog / .php $ / category / blog / [R = 301, L] rewriteille ^ category / blog /? $ Blog.php [L] ...   

That only bankya works now what I have to do, rewrite

/blog.php ? Pagenum = x

to

/ category / blog / page / x /

in .htaccess:

  ... RewityCand% {THE_REQUEST} ^ (get | post | top) \ blog \ .php \? Pagenum = ([0-9] *) \ HTTP / RewriteRule ^ blog \ .php $ / category / blog / page /% 2 / [R = 301, L] rewritable ^ category / blog / page / ([0- 9 ] +) / $ Blog.php [l]   

The first rule I can do is to finish the job, but this query does not have to be springs, Instead, like ...

/blog.php?pagenum=2 is equivalent to the example

Add a question mark at the end of your goal in your RewriteRule:

 < Code> rewrite rule ^ blog / .php $ / category / blog / page /% 2 /? [R = 301, L]    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -