jamestl2 Posted November 15, 2007 Posted November 15, 2007 I’m trying to move a few of my pages into new categories and redirecting the old ones via cpanel. I entered this into the redirect setup and received this error (I'm using wordpress): > Apache detected an error in the Rewrite config. Syntax error on line 14 of /home/public_html/.htaccess.E86RC8slwVDheTlEypzC8LrMW3XvwPQ9: RewriteBase: only valid in per-directory config files Then I tried just entering one of my redirects this way into my .htaccess file manually: > RewriteRule . /index.php [L] </IfModule> # END WordPress Redirect 301 www.toptenlisted.com/science/top-10-ideal-future-inventions-and-technologies www.toptenlisted.com/computers-technology/top-10-ideal-future-inventions-and-technologies But with this I get a 500 internal server error and my whole site shuts down. I also tried adding the "http://" part too, but no luck. I don’t know what else to try. (In that example I’m trying to redirect my page “Top 10 Ideal Future Inventions and Technologies” from my science category to my computer-technology category) Quote
TCH-Andy Posted November 15, 2007 Posted November 15, 2007 It sounds like you either have the syntax wrong somewhere in your .htaccess. If you open a ticket and tell us exactly what you want to achieve, we'll take a quick look for you ( or you can post here, with your complete .htaccess file ) If you post it here on the forum, remember to remove any sensitive info ( usernames etc). Quote
TCH-Bruce Posted November 15, 2007 Posted November 15, 2007 From the looks of it the statement is not complete. Where is the page information? Like ending each with /*.php Quote
jamestl2 Posted November 15, 2007 Author Posted November 15, 2007 Ok, now I don't know what's going on, when I open my cpanel file manager, my htacess file doesn't even show up, but when I open my FTP program (Filezilla), there it is, but I can't access it. But even when it was showing up (in cpanel) it still wasn't working, I suppose I'll just have to open a ticket then Quote
TCH-Bruce Posted November 15, 2007 Posted November 15, 2007 The .htaccess file is a hidden text file. That's why it would appear in one program and not another if the program was not configured to show hidden files. Quote
jamestl2 Posted November 15, 2007 Author Posted November 15, 2007 Then why does it show up sometimes, but not other times (in the cpanel file manager)? Does it have something to do with permissions? code? Or what? (I need to see the file for when I open up a ticket) Quote
TCH-Bruce Posted November 15, 2007 Posted November 15, 2007 There is a setting in cPanel's File Manager that you have to check to see hidden files. Files beginning with a period in *nix are hidden to non-superuser users. Quote
jamestl2 Posted November 15, 2007 Author Posted November 15, 2007 (edited) Where exactly is this setting? I don't see a checkbox or anything to mark anywhere. Edited November 15, 2007 by jamestl2 Quote
TCH-Thomas Posted November 15, 2007 Posted November 15, 2007 At the screen "File Manager Directory Selection", there is a checkbox for it. When you see this screen for the first time there is an option saying "Skip this question, and always open this directory in the future when opening File Manager". If you have checked that option am not sure if you can get this screen back to check the box for hidden files. Quote
jamestl2 Posted November 15, 2007 Author Posted November 15, 2007 Alright, thanks Thomas Here is my .htaccess code (In case anyone can spot a simple error I'm missing somewhere within it): >Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^toptenlisted\.com RewriteRule ^(.*)$ http://www.toptenlisted.com/$1 [R=permanent,L] # index.php to / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/ RewriteRule ^(.*)index\.php$ /$1 [R=301,L] # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Redirect permanent http://www.toptenlisted.com/About%20Site.html http://toptenlisted.com/ten-things-about-toptenlisted RedirectMatch permanent ^/Index.html$ http://www.toptenlisted.com Quote
click Posted November 18, 2007 Posted November 18, 2007 (edited) Don't include the domain name in the first part of the redirect. The 2nd part should begin with http://domain/. So, using the example from your original post, it should be: >Redirect 301 /science/top-10-ideal-future-inventions-and-technologies http://www.toptenlisted.com/computers-technology/top-10-ideal-future-inventions-and-technologies Edited November 18, 2007 by click Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.