Dynadot โ€” .com Registration $8.99

.htaccess redirect

Spacemail by SpaceshipSpacemail by Spaceship
Watch

Maurizio1230

Established Member
Impact
5
Hi all,

I try to make a redirection in Redirects Section on Cpanel 11 from linuxinvent.info to linuxinvent.info/home/modules/news but i received this error:

Redirecting / to http://linuxinvent.info/home/modules/news will cause a redirection loop because '/'

which is located at /home/linuxinvent/public_html/

is above 'http://linuxinvent/linux/modules/news'

which is located at /home/linuxinvent/public_html/linux/modules/news

On cpanel.net I see that is a bug on cpanel 11.
How can I make a personal .htaccess for redirecting from linuxinvent.info to linuxinvent.info/linux/modules/news?

Thank you very much ;)
Bye Maurizio1230
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
RewriteEngine On
RewriteCond ^(https?:\/\/(www\.)?)?linuxinvent.info$
RewriteRule http://linuxinvent.info/linux/modules/news [R]

Something like that...I wrote that off the top of my head and didn't test it...but you want to use mod_rewrite for this.
 
0
•••
monaco said:
RewriteEngine On
RewriteCond ^(https?:\/\/(www\.)?)?linuxinvent.info$
RewriteRule http://linuxinvent.info/linux/modules/news [R]

Something like that...I wrote that off the top of my head and didn't test it...but you want to use mod_rewrite for this.

Hi monaco,

why https?

Thanks for the reply ;)
 
0
•••
Sorry, force of habit :) The question mark will make it match http or https.

It can be ^(http:\/\/(www\.)?)?linuxinvent.info$ if you're sure you're never going to use SSL on the site.
 
0
•••
I see this:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.37 Server at www.linuxinvent.info Port 80

I created a file .htacce and I wrote in this:

RewriteEngine On
RewriteCond ^(http?:\/\/(www\.)?)?linuxinvent.info$
RewriteRule http://linuxinvent.info/linux/modules/news [R]

How can I edit it for right redirection?

Thanks ;)
 
0
•••
What's it say in the error log? You can get to it via cPanel.
 
0
•••
here you are

[Mon Jun 11 21:08:13 2007] [alert] [client 65.55.213.110] /home/linuxinv/public_html/.htaccess: RewriteCond: bad argument line '^(http?:\\/\\/(www\\.)?)?linuxinvent.info$'\n
[Mon Jun 11 21:08:13 2007] [alert] [client 65.55.213.110] /home/linuxinv/public_html/.htaccess: RewriteCond: bad argument line '^(http?:\\/\\/(www\\.)?)?linuxinvent.info$'\n
[Mon Jun 11 21:04:27 2007] [alert] [client 66.249.72.177] /home/linuxinv/public_html/.htaccess: RewriteCond: bad argument line '^(http?:\\/\\/(www\\.)?)?linuxinvent.info$'\n
[Mon Jun 11 21:04:27 2007] [alert] [client 66.249.72.177] /home/linuxinv/public_html/.htaccess: RewriteCond: bad argument line '^(http?:\\/\\/(www\\.)?)?linuxinvent.info$'\n
[Mon Jun 11 21:03:12 2007] [alert] [client 65.55.213.110] /home/linuxinv/public_html/.htaccess: RewriteCond: bad argument line '^(http?:\\/\\/(www\\.)?)?linuxinvent.info$'\n
[Mon Jun 11 21:03:12 2007] [alert] [client 65.55.213.110] /home/linuxinv/public_html/.htaccess: RewriteCond: bad argument line '^(http?:\\/\\/(www\\.)?)?linuxinvent.info$'\n
[Mon Jun 11 20:51:52 2007] [alert] [client 87.19.14.45] /home/linuxinv/public_html/.htaccess: RewriteCond: bad argument line '^(http?:\\/\\/(www\\.)?)?linuxinvent.info$'\n
[Mon Jun 11 20:51:52 2007] [alert] [client 87.19.14.45] /home/linuxinv/public_html/.htaccess: RewriteCond: bad argument line '^(http?:\\/\\/(www\\.)?)?linuxinvent.info$'\n
[Mon Jun 11 20:50:42 2007] [alert] [client 87.19.14.45] /home/linuxinv/public_html/.htaccess: RewriteCond: bad argument line '^(http?:\\/\\/(www\\.)?)?linuxinvent.info$'\n
[Mon Jun 11 20:50:42 2007] [alert] [client 87.19.14.45] /home/linuxinv/public_html/.htaccess: RewriteCond: bad argument line '^(http?:\\/\\/(www\\.)?)?linuxinvent.info$'\n
[Mon Jun 11 20:50:38 2007] [alert] [client 87.19.14.45] /home/linuxinv/public_html/.htaccess: RewriteCond: bad argument line '^(http?:\\/\\/(www\\.)?)?linuxinvent.info$'\n
[Mon Jun 11 20:50:38 2007] [alert] [client 87.19.14.45] /home/linuxinv/public_html/.htaccess: RewriteCond: bad argument line '^(http?:\\/\\/(www\\.)?)?linuxinvent.info$'\n
 
0
•••
Try
Code:
RewriteCond ${REQUEST_URI} ^(http?:\/\/(www\.)?)?linuxinvent.info$
 
0
•••
but now it doesn't redirect me. I see the "Index of"

Bye Maurizio1230
 
0
•••
Do you see the index of the directory you want to redirect to or the index of the / directory?

Try changing the rewrite rule:
Code:
RewriteRule http://linuxinvent.info/linux/modules/news [R]
to
RewriteRule http://linuxinvent.info/linux/modules/news/index.php [R]
Use whatever you use as your index page.
 
0
•••
Hi monaco,

I resolve the problem because now the cpanel 11 bug was resolved by my hosting.
Thank you very much monaco ;)

P.S. I add a reputation to you
 
0
•••
Glad to hear ya got it fixed; sorry I couldn't be of more help.
 
0
•••
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back