homepage Welcome to WebmasterWorld Guest from 54.237.134.62
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
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
sanjaykattimani




msg:3764093
 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
Eg.

/birthday/flowers-dance
should be converted to
kg.php?c=birthday&g=flowers-dance

AND

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

is this possible.

 

Slade




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

<open preferred search engine>
type: mod_rewrite

sanjaykattimani




msg:3764131
 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.
/father-ji
it works fine as expected.

Case 2.
/father/ji
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.

g1smd




msg:3764141
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved