Portal Home > Knowledgebase > Articles Database > Mod_rewrite redirect help
Mod_rewrite redirect help
Posted by Jinovich, 08-07-2008, 02:52 PM |
Basically, I have moved my web application from
/public_html/news/ to /public_html/
I would like to set the redirects so that
/news/index.php?catid=22&newsid=23 would go to /index.php?catid=22&newsid=23
Basically all I want it to do is get the url and remove the /news from it so that all the links to content on my site still works.
Can anyone help as I am failing with the code for this task.
would this rule work?
Last edited by Jinovich; 08-07-2008 at 02:55 PM.
|
Posted by koolcards, 08-07-2008, 03:24 PM |
You can try this:
http://httpd.apache.org/docs/1.3/misc/rewriteguide.html
Personally, I would simply replace the '/news' directory with a static link to '/public_html'
|
Posted by qbert220, 08-07-2008, 04:33 PM |
The "\." will match a dot in the "index.php" part of the URL. The match then fails.
I think
should work for you.
|
Add to Favourites Print this Article
Also Read