Help with redirect

Hi there i am running vbulletin and i am having a problem due to the way
that nginx displays clean urls.

Basically the archive looks like this on nginx

http://www.digitalworldz.co.uk/archive/index.php?f-354.html

But i need it to look like this (taking the ? and putting the /)

http://www.digitalworldz.co.uk/archive/index.php/f-354.html

I have tried to write the rewrite code from other parts on the internet
but have no luck at all and also asked on vbulletin mod site and the
official site but it seems that suppport for nginx is not so popular as
apache :frowning:

Thanks in advance if anyone can help me out.

Mickie

I had a similar situation. I think you can do something as simple as,

rewrite ^/archive/index.php /archive/index.php/$query_string;

Chris S. wrote:

I had a similar situation. I think you can do something as simple as,

rewrite ^/archive/index.php /archive/index.php/$query_string;

Thanks very much for the post.

But i could not get that to work i now get a 404 error page not
displayed

Thanks again

Well, you would in that case since the new path doesn’t exist. I see now
you want backwards from that as I misinterpreted the direction of
conversion in your original question. You want requests without the
query string to be converted into a query string. That is actually
opposite to my case so I would make a guess that it should be more like,

rewrite ^/archive/index.php/(.*)$ /archive/index.php?$1

But I could easily be wrong. That should be close though. You’d have to
try it out and adjust as works.
Chris :slight_smile:

Chris S. wrote:

Well, you would in that case since the new path doesn’t exist. I see now
you want backwards from that as I misinterpreted the direction of
conversion in your original question. You want requests without the
query string to be converted into a query string. That is actually
opposite to my case so I would make a guess that it should be more like,

rewrite ^/archive/index.php/(.*)$ /archive/index.php?$1

But I could easily be wrong. That should be close though. You’d have to
try it out and adjust as works.
Chris :slight_smile:

thanks again chris for the help.

But i still cannot seem to get it to work i have tried different ways of
putting the dir but still nothing happens :frowning:

but i do appreciate the time you are spending helping me.

Mick

Well i have got it working now so it redirects but it still keeps the
existing page ?

i now have both

http://www.digitalworldz.co.uk/archive/index.php?f-357.html

and

http://www.digitalworldz.co.uk/archive/index.php/f-357.html

I am a little confused now it will be ok because now at least google
will see the pages and i should not get the warning but i might get in
trouble for duplicate content ?

Thanks for the help.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs