Re: Redirect only a specific index.php page to new location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/01/18 22:53, Kory Wheatley wrote:
Ya there is a .htaccess that has the base set to deptblogs what could I change in here to get it to work?

[kwheatley@sftpface2 wordpress]$ cat .htaccess
RewriteEngine On
RewriteBase /deptblogs/
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

This looks too complex for me to interpret for sure without real-world tests, particularly, because [L] in .htaccess context does not actually end rewriting like one might though. (If you really want to be sure no redirect is already in progress, test REDIRECT_STATUS environment variable like this:
RewriteCond %{ENV:REDIRECT_STATUS} ^$
.)

Looks like you have added some rules while trying to solve your problem, while rest came from default Wordpress installation. I'd leave only default Wordpress ones and see if it solves unnecessary redirects.

--

With Best Regards,
Marat Khalili

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux