Jump to content

htaccess condition for redirect pld page to new page.


deepson2

Recommended Posts

Hello,

 

I am just changing one of my webpage with slight difference in its url. I was just wondering how can i redirect my old page (if someone got indexed page )

to the new page.

 

my old url page address would be like this

 

Quote:

mysite.com/categories/blogname

(e.g-bloganame would like anything myworld.wordpress.com etc)

so it ll become like this-

 

Quote:

mysite.com/categories/myworld.wordpress.com

 

and now on the new webpage my address would be like the following where i want to append the username who's blog is registered on my site.

(earler it was anonymous blog so he/she need to claim it first(he/she ll get username using this process) and then eventually it ll become his/her own blog)

 

So my new address will be like

 

 

Quote:

mysite.com/categories/myworld.wordpress.com-info4bein/

 

where info4bein is the username.

I have found this

 

http://www.itsalif.info/content/apac...e-been-applied

 

I am trying to understanding this and i wanted to do something similar.

 

This is my mod-write definition for the category page which are having their username

 

 

Quote:

RewriteRule categories/([-a-z|A-Z|0-9|-|_|.|&]+)$ /categories/$1/ [R=301,L]

RewriteRule categories/([-a-z|A-Z|0-9|-|_|.|&]+)/$ /myfolder/categories\.php?url=$1

Can anyone please check this and guide me in the right direction.

 

Thanks in advance.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.