Need to configure below rewrite rule in Sub-directory in nginx configuration. subfolder name is example.com/interview/
location / {
rewrite ^/([^/]+)/$ /interview-category.php?hri_id=$1;
}
location /questions {
rewrite ^/questions/([^/]+)$ /hrinterview-forum.php?topic=$1;
}
any help thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Hi @dasa,
I’m not sure I quite understand the question, can you be a little more specific, do you wish to make a rewrite rule everytime example.com/interview/ is visited to somewhere else or the other way around?
Anyway, here are some suggestions.
This’ll just do requests specifically for the root. If you need to catch everything (redirect http://example.com/somearticle/something.html to http://example.com/interview/somearticle/something.html), then you’ll need something more involved:
Regards, KDSys