.htaccess - Rewrite URL in wordpress with subfolders -
i make simple url rewrite can not succeed... here have:
i have 3 websites on same hosting.
www.websiteaaa.com - regular website, located in '/website-aaa-folder' folder
www.websitebbb.com - regular website, located in '/website-bbb-folder' folder
www.websiteccc-wordpress.com - wordpress website, , located in '/website-ccc-wordpress-folder' folder
i order redirect requests correct domain-filder have .htaccess file in main directory:
options +symlinksifownermatch addtype text/html .shtml addoutputfilter includes .shtml #redirect correct folder rewritecond %{http_host} websiteaaa.com$ [nc] rewritecond %{request_uri} !^/website-aaa-folder/.*$ rewriterule ^(.*)$ /website-aaa-folder/$1 [l] #redirect correct folder rewritecond %{http_host} websitebbb.com$ [nc] rewritecond %{request_uri} !^/website-bbb-folder/.*$ rewriterule ^(.*)$ /website-bbb-folder/$1 [l] #redirect correct folder rewritecond %{http_host} websiteccc-wordpress.com$ [nc] rewritecond %{request_uri} !^/website-ccc-wordpress-folder/.*$ rewriterule ^(.*)$ /website-aaa-folder/$1 [l]
in /website-ccc-wordpress-folder/ (where wordpress site is), there additional .htaccess file:
<ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule>
i woulde rewite www.websiteccc-wordpress.com/aaa/ www.websiteccc-wordpress.com/?id=2&someugleurl=e&blabla=1
i add line .htaccess file in root folder:
rewriterule ^(aaa)$ ?id=2&someugleurl=e&blabla=1 [l]
however, not work.
please advice.
thanks
figured out
you have put line
rewriterule ^(aaa)$ ?id=2&someugleurl=e&blabla=1 [l]
to first in htaccess file in wordpress
rewriterule ^(aaa)$ ?id=2&someugleurl=e&blabla=1 [l] <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule>
Comments
Post a Comment