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

le="color: #000000"><?php RewriteEngine on RewriteCond %{QUERY_STRING} ^id RewriteRule ^/modules/content/print.php$ http://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:

le="color: #000000"><?php rewriteEngine on rewriteRule ^noexist.html$ http://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.

le="color: #000000"><?php Options +FollowSymLinks rewriteEngine on rewriteRule ^noexist.html$ http://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

Who's Online

220 user(s) are online (184 user(s) are browsing Support Forums)


Members: 0


Guests: 220


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits