i am working with an htaccess file that someone else wrote and I am having some problems getting it working.
First, Sub directories do not load at all.
Second, I have a sub domain which is in a sub directory, The content loads but the css and images do not. It is a basic word press install in the /wp/ directory.
Here is a sample of the htaccess file. Can anyone help please. Thank you.
Note: you may notice a reference to drupal in the code. This actually works the same way I am trying to get word press to work. I’ve tried copying and modifying that part of the code but it didn’t help.
What you have is some pretty greedy code! Sample? If the rest is anything like this, it’s no wonder anything but index.php is loading!
RewriteEngine on
RewriteBase /
RewriteRule ^funcs/.*$ index.php [L]
RewriteRule ^search\\W index.php [L,QSA]
RewriteRule ^print print.php [L,QSA]
RewriteRule ^admin/?([^/\\.]+(/[^/\\.]+)?)?/?$ index.php?a=$1 [L,QSA]
RewriteCond %{SERVER_NAME} !^students\\.mysite\\.edu$
RewriteRule ^((/?[^/\\.]+)*)?/?$ index.php?p=$1 [L,QSA]
# the "tents" are not necessary, i.e.,
# don't escape the dot character in a character range definition!
RewriteCond %{SERVER_NAME} ^my\\.mysite\\.edu$
RewriteRule ^(.*)$ /drupal/$1 [L,QSA]
# here, EvERYTHING (including all the above redirections)
# have been redirected to the drupal subdirectory.
# and you really expect to squeeze "greedy" WP mod_rewrite code in here, too?
The best hope you have is to use your DocumentRoot as a website “landing pad” then redirect to drupal, WP, whatever from there and let their code be greedy at their own subdirectory level (especially when you won’t show your whole .htaccess).