Welcome to WebmasterWorld Guest from 54.158.54.179

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

url redirect with same url in addressbar

url redirect with same url in addressbar

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

10+ Year Member



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.

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

10+ Year Member



<open preferred search engine>
type: mod_rewrite
6:48 pm on Oct 12, 2008 (gmt 0)

10+ Year Member



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.

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

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month