imoracle
06-19-2008, 05:42 PM
Hello All,
I am trying to achieve the following things on my site. I have an answers section, under which I have sub categories like internships, jobs etc etc.
http://mysite.com/answers goes to http://mysite.com/answers.php
This works fine, but when I try to do:
http://mysite.com/answers/jobs which must go to http://mysite.com/jobs.php or http://mysite.com/answers.php?q=jobs
it doesn't go to either of them I have tried several rewrite rules.
Another thing which is important is:
I also want to provide my users a public url like:
http://mysite.com/username which goes to http://mysite.com/publicprofile.php?q=username
This is also working fine. Just that the internships and jobs link doesnt work fine. I get a page with no css or javascript.
Here are the rewrite rules I am using:
RewriteRule ^answers answers.php
RewriteRule ^answers/ answers.php
RewriteRule ^answers/([a-zA-Z0-9_-]+)$ answers.php?q=$1
RewriteRule ^answers/([a-zA-Z0-9_-]+)/$ answers.php?q=$1
RewriteRule ^([a-zA-Z0-9_-]+)$ publicprofile.php?q=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ publicprofile.php?q=$1
I tried the above set. http://mysite.com/answers and http://mysite.com/username works fine. But http://mysite.com/answers/jobs doesn't work fine. It doesn't go as http://mysite.com/answers.php?q=jobs internally.
Can someone kindly suggest me a solution to it ??
Thanks in advance,
Imoracle
I am trying to achieve the following things on my site. I have an answers section, under which I have sub categories like internships, jobs etc etc.
http://mysite.com/answers goes to http://mysite.com/answers.php
This works fine, but when I try to do:
http://mysite.com/answers/jobs which must go to http://mysite.com/jobs.php or http://mysite.com/answers.php?q=jobs
it doesn't go to either of them I have tried several rewrite rules.
Another thing which is important is:
I also want to provide my users a public url like:
http://mysite.com/username which goes to http://mysite.com/publicprofile.php?q=username
This is also working fine. Just that the internships and jobs link doesnt work fine. I get a page with no css or javascript.
Here are the rewrite rules I am using:
RewriteRule ^answers answers.php
RewriteRule ^answers/ answers.php
RewriteRule ^answers/([a-zA-Z0-9_-]+)$ answers.php?q=$1
RewriteRule ^answers/([a-zA-Z0-9_-]+)/$ answers.php?q=$1
RewriteRule ^([a-zA-Z0-9_-]+)$ publicprofile.php?q=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ publicprofile.php?q=$1
I tried the above set. http://mysite.com/answers and http://mysite.com/username works fine. But http://mysite.com/answers/jobs doesn't work fine. It doesn't go as http://mysite.com/answers.php?q=jobs internally.
Can someone kindly suggest me a solution to it ??
Thanks in advance,
Imoracle
