homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

url redirect with same url in addressbar
url redirect with same url in addressbar

 3:47 pm on Oct 12, 2008 (gmt 0)

I read numerous pages on WebmasterWorld but none helped me completely.
i have kg.php in root folder that serves all pages by taking an argument.
i have various folders (dummy) with argument passed on that needs to be redirected to kg.php

should be converted to


this redirection should not be shown on browser (should be hidden from user and search engines)

is this possible.



 6:07 pm on Oct 12, 2008 (gmt 0)

<open preferred search engine>
type: mod_rewrite


 6:48 pm on Oct 12, 2008 (gmt 0)

Here is what i tried

RewriteEngine on
RewriteRule ^father(.*)$ ./kannada-greeting.php?g=$1 [L]

Here is what happens
Case 1.
it works fine as expected.

Case 2.
This spoils the page with css, images missing(as it considers father as a directory/folder.

Any work arounds?
I have tried RewriteRule ^father/(.*)$ ./kannada-greeting.php?g=$1 [L]
Which doesnt work either.


 7:17 pm on Oct 12, 2008 (gmt 0)

URLs derived from links to CSS and images are resolved by the browser and so links to those should specify the full path starting with a / and including the full path to the file, like /images/someimage.jpg

As for your redirects and rewrites, this other thread shows the full process, which you need to understand before making changes to your server configuration: [webmasterworld.com...]

You need the redirects as well as the rewrites, otherwise both URLs continue to work, and both will be indexed by search engines as Duplicate Content.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved