Hi here is my current .htaccess file: options +followsymlinks rewriteengine on rewritecond %{HTTP_HOST} ^domain.com [nc] rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc] rewriterule ^images/posters/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/ /image.php?type=posters&movie=$1&id=$2 [L] rewriterule ^admin/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ /index.php?page=admin&admin=$1&sub=$2 [L] rewriterule ^admin/([A-Za-z0-9-]+)/?$ /index.php?page=admin&admin=$1 [L] rewriterule ^blog/([A-Za-z0-9-]+)/?$ /index.php?page=blog&post=$1 [L] rewriterule ^trailers/(new|a-z|most-watched)/?$ /index.php?page=trailers&list=$1 [L] rewriterule ^trailers/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ /index.php?page=trailers&movie=$1&trailer=$2 [L] rewriterule ^trailers/([A-Za-z0-9-]+)/?$ /index.php?page=trailers&movie=$1 [L] rewriterule ^galleries/(new|a-z|most-viewed)/?$ /index.php?page=galleries&list=$1 [L] rewriterule ^galleries/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ /index.php?page=galleries&movie=$1&gallery=$2 [L] rewriterule ^galleries/([A-Za-z0-9-]+)/?$ /index.php?page=galleries&movie=$1 [L] rewriterule ^movies/(coming-soon|a-z|recently-added)/?$ /index.php?page=movies&list=$1 [L] rewriterule ^movies/([A-Za-z0-9-]+)/?$ /index.php?page=movies&movie=$1 [L] rewriterule ^actors/([A-Za-z0-9-]+)/?$ /index.php?page=artist&artist=$1&type=actor [L] rewriterule ^directors/([A-Za-z0-9-]+)/?$ /index.php?page=artist&artist=$1&type=director [L] rewriterule ^writers/([A-Za-z0-9-]+)/?$ /index.php?page=artist&artist=$1&type=writer [L] rewriterule ^posters/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ /index.php?page=poster&movie=$1&id=$2 [L] rewriterule ^posters/([A-Za-z0-9-]+)/?$ /index.php?page=poster&movie=$1 [L] rewriterule ^([A-Za-z0-9-]+)/?$ /index.php?page=$1 [L] Code (markup): Only thing I want changed is when someone goes to www.domain.com that they be redirected to www.domain.com/blog/ PLEASE HELP!
You can just use the redirect option in cpanel to do this. It is easier since you only want to redirect domain.com to domain.com/blog.
Try this solution: RewriteEngine on RewriteCond %{HTTP_HOST} ^www.domain.com [NC] RewriteRule ^(.*)$ http://www.domain.com/blog/$1 [R=301]
Wouldn't that take EVERYTHING and append /blog/ to it? I'm just wanting the root domain to redirect to /blog/ so no one can ever go to www.domain.com without them being transferred. Just to give you an idea of the spec: I'm working on a movie website that has 4 main headers: blog, trailers, movies, galleries. Each of these have a root address: domain.com/blog/, domain.com/trailers/, domain.com/movies/, & domain.com/galleries/. The main draw (or at least my goal for it to be) is going to be the blog so when someone comes to the site I want that the blog to be what they see. Currently it is via PHP includes, however I also want the URL to reflect what they are looking at.
If it doesn't work, just remove the suggested redirection code and let's try another solution. Kindly provide us then your feedback.
It does what I said it did... my unsureness was meant as a courtesy, what was going to happen was fairly obvious.
Hmm I actually had a friend suggest that and it is timing out and ending up on this URL: http://www.filmfollower.com/blog/bl...blog/blog/blog/blog/blog/?page=blog&post=blog Something is obviously causing the server to think that all URLs should be following this rule, even if I go to a different URL such as: http://www.filmfollower.com/trailers/ and it ends up going to: http://www.filmfollower.com/blog/bl...og/blog/blog/trailers?page=blog&post=trailers Ugh, I hate not knowing where to even begin with this problem :/
Not sure if anyone cares but I solved it and here is the line that served as the solution: redirectmatch 301 ^/$ http://www.filmfollower.com/blog/ Code (markup): I'm thinking that dollar sign is what I was missing from day one. But whatever, I still don't get htaccess but all's well that ends well.