1
blackrx
How do i redirect an old xoops page to main page ?
  • 2010/3/16 1:24

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


this old link of my site is still exist in search engine
and when you go to this url you will see blank page
what is worse is

it appears on top of the search result


i don't use the content module anymore


mysite.com/modules/content/print.php?id=32
mysite.com/modules/content/print.php?id=34
mysite.com/modules/content/print.php?id=38


how do i redirect the url above to my main page with htaccess ?

or maybe there is other way

2
Peekay
Re: How do i redirect an old xoops page to main page ?
  • 2010/3/16 2:43

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


You can try

RewriteEngine on 
RewriteCond 
%{QUERY_STRING} ^id
RewriteRule 
^/modules/content/print.phphttp://www.mysite.com [L,R=301]


But it's late and I am heading for bed, so you might want to see what others recommend!

3
blackrx
Re: How do i redirect an old xoops page to main page ?
  • 2010/3/16 6:22

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


thank you peekay

but its not working

4
Peekay
Re: How do i redirect an old xoops page to main page ?
  • 2010/3/16 11:42

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Apache Mod Rewrite needs to be enabled on your server which is not always the case. To test:

rewriteEngine on
rewriteRule 
^noexist.htmlhttp://www.mysite.com/doesexist.html [L]


Upload 'doesexist.html', request the page 'noexist.html' in your browser and you should be redirected.

If that doesn't work, try adding the 'symlinks' line, e.g.

Options +FollowSymLinks
rewriteEngine on
rewriteRule 
^noexist.htmlhttp://www.mysite.com/doesexist.html [L]

5
sailjapan
Re: How do i redirect an old xoops page to main page ?

If your host provides you with CPanel, there's a redirect function there that's easy to use.

6
blackrx
Re: How do i redirect an old xoops page to main page ?
  • 2010/5/1 13:59

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


yes i use cpanel redirection and its working...thanks

Login

Who's Online

430 user(s) are online (278 user(s) are browsing Support Forums)


Members: 0


Guests: 430


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits