Redirecting subdirectory htaccess
|
Posted
#69296
(In Topic #14677)
|
|
|---|---|
|
Well-settled |
Subdirectory to Main DirectoryCode
Redirect 301 infusions/* http://www.youtrippy.com/
Code
Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^youtrippy/infusions/*\.com RewriteRule ^(.*)$http://www.youtrippy.com/$1[R=permanent,L]
Code
Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^youtrippy/infusions/*\.com$ [NC] RewriteRule ^(.*)$http://www.youtrippy.com/$1[R=301,L]
Anyone know the correct code? |
|
Posted
|
|
|
Community saint |
Code
RewriteRule ^infusions/?(.*) http://www.youtrippy.com/ [R=301,L]
Visit Last Gamer because its made with ocPortal.
Stay for the content - Video game retrospectives, reviews, galleries and discussions. Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio . |
|
Posted
|
|
|
Well-settled |
Only other issue I see is the address bar stays the same. So if I visit: 301 Moved Permanently It redirects me to the primary site, but the address bar remains: 301 Moved Permanently That should change to the primary site link too. |
|
Posted
|
|
|
Community saint |
Visit Last Gamer because its made with ocPortal.
Stay for the content - Video game retrospectives, reviews, galleries and discussions. Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio . |
|
Posted
|
|
|
Well-settled |
|
|
Posted
|
|
|
Well-settled |
I originally just had the command change from non-www to adding the www. But I've recently decided to do away with my index "intro" page and go directly into the ocPortal folder. I'm having trouble though, as it is directing every folder I type in to that specific folder. For example, if I have an /images/ folder where I keep all my regular images for my site, logos, banners, etc. When I type it in, it just directs me to a 404 error page. What I want is to direct only URLs specified to lead to that specific page. So for example, if I type in (URL parsed) youtrippy . com -> http … www … youtrippy … social … site … index.php?page=start www … youtrippy … com … -> http … www … youtrippy … social … site … index.php?page=start But unfortunately, if I type in http://www.youtrippy.com/images/youtrippy_banner.gif, I get taken to this URL: Code
http://www.youtrippy.com/social/site/index.php?page=startimages/
And the image ends up not being found. Or if I type in another URL to a section of my site, for example: http://www.youtrippy.com/videos - a whole other section - I can't get there. Here is the code I am using: Code
Options +FollowSymLinks
I'm sure I'm just doing writing something wrong. Anyone know how to correct this code? |
|
Posted
|
|
|
Well-settled |
The code I used and put before each of the other rules: Code
RewriteRule ^(images|videos)($|/) - [L]
|
1 guests and 0 members have just viewed this: None
Control functions:






