Closed pokal4u closed 10 years ago
What are you trying to do exactly? What is your purpose, tell some please...
Hi, We are trying to minimize url structure for seo purpose my actual url like ------http://www.domain.com/profile.php?name=srinivas I need above url like ---http://www.domain.com/srinivas/ without creating a 'srinivas' folder
Thanks
You can use rewrite,
rewrite ^/([A-z0-9]+)/$ /profile.php?name=$1 last;
but it's not a related question with nginx-push-stream-module. Please use stackoverflow.com instead.
It does not relate to the module.
Probably you should try nginx rewrite module: http://nginx.org/en/docs/http/ngx_http_rewrite_module.html You can find the following example on the page which is probably almost what you need:
If a replacement string includes the new request arguments, the previous request arguments
are appended after them. If this is undesired, putting a question mark at the end of a
replacement string avoids having them appended, for example:
rewrite ^/users/(.*)$ /show?user=$1? last;
If a regular expression includes the “}” or “;” characters, the whole expressions should
be enclosed in single or double quotes.
Hi @pokal4u
you can do something like this
location ~ ^(/.*)/$ {
push_stream_channels_path $1;
...
}
when you access http://www.domain.com/srinivas/ the $1 will assume the value /srinivas
Regards
Hi, I am using nginx push stream module How can i access urls without create any folder Ex: http://www.domain.com/srinivas/ http://www.domain.com/nagaraju/ http://www.domain.com/ravi/ ....... Thanks