Warning: include(/home/content/m/t/v/mtv123/html/muhammadsafwat/wp-content/plugins/wp-super-cache/wp-cache-base.php) [function.include]: failed to open stream: No such file or directory in /home/content/17/6671517/html/muhammadsafwat/wp-content/plugins/wp-super-cache/wp-cache.php on line 65

Warning: include() [function.include]: Failed opening '/home/content/m/t/v/mtv123/html/muhammadsafwat/wp-content/plugins/wp-super-cache/wp-cache-base.php' for inclusion (include_path='.:/usr/local/php5_3/lib/php') in /home/content/17/6671517/html/muhammadsafwat/wp-content/plugins/wp-super-cache/wp-cache.php on line 65

Warning: include_once(/home/content/m/t/v/mtv123/html/muhammadsafwat/wp-content/plugins/wp-super-cache/ossdl-cdn.php) [function.include-once]: failed to open stream: No such file or directory in /home/content/17/6671517/html/muhammadsafwat/wp-content/plugins/wp-super-cache/wp-cache.php on line 82

Warning: include_once() [function.include]: Failed opening '/home/content/m/t/v/mtv123/html/muhammadsafwat/wp-content/plugins/wp-super-cache/ossdl-cdn.php' for inclusion (include_path='.:/usr/local/php5_3/lib/php') in /home/content/17/6671517/html/muhammadsafwat/wp-content/plugins/wp-super-cache/wp-cache.php on line 82
htaccess redirect the root to sub folder

Redirecting From the Root of your domain to a sub-folder using htaccess

I needed to map the root of my domain www.muhammadsafwat.com to the folder of WordPress so i figured out that because this is an Apache server I might do the trick using the rewrite rules of Apache server but it turned out to be not correct. It seems that the rewrite rule does not work when you redirect from the root of the domain for some reason

I tried this in my htaccess

RewriteRule / http://www.muhammadsafwat.com

and it did not work

it only works when you are redirecting from non root directory

so I found this instead and it worked like a charm

RedirectMatch permanent ^/$ http://www.muhammadsafwat.com/wordpress

I’m not sure why but it did work thank God now I can have my domain going to my blog

After checking this I found that all my other domains are not redirecting to the blog so I changed these rules with the following based on a friend advice and it is working now finally

Rewriterule ^/(.+)$                http://www.muhammadsafwat.com/$1 [L]
Rewriterule ^.*$                http://www.muhammadsafwat.com/wordpress [R,L]

Comments

comments

Post Comment

You must be logged in to post a comment.

Or