Ok, I looked around a bit and I can’t find the answer.
Now I do not ask you to give me only a block of code and say "this is a correction", I would like you to explain how you did it, what you came up with, etc. I would like to know more about this, and the only way to find out is by example.
Now I need to do the following:
Currently, my blog (word press go figure because they belong to the world) is in the root directory. So my message is as follows: http://localhost/hello-world. Just an example.
However, I just expanded my site with the built-in PHP script using Code Igniter. I need to put the Code Igniter script in the root directory and move the blog to / main / or / blog /. I do not want to get rid of my blog, but I do not want Google to review every single blog, or Google leads to incorrect posts. More importantly, I don’t want to sit here for hours and hours creating redirect URLs for every blog post (there are hundreds of them).
Now I need to redirect the 301 redirect.
Here is the problem I am facing.
I need to have this in .htaccess:
RewriteEngine on
RewriteCond $1 !^(index\.php|admin|css|img|js|main|favicon.ico)
RewriteRule ^(.*)$ index.php/$1 [L]
This removes the ugly localhost / index.php / controller / controller-function /
But I need to make my .htaccess redirect everything to / but NOT the given URLs that I already have.
, Code Igniter:
/details/
/register/
/city/
/search_process/
/login/
/logout-success/
/login-success/
/logout/
/login/
/manage/
/panel/
, ..
localhost/hello-world/ 301 localhost/main/hello-world
localhost/(any-of-the-above)/ /main//blog/
, .htaccess, , /admin//css//img//js/ (/main/), favicon.ico( )
, ! ( ?: P)
!
, , , / ( , ).
, . (, ), , . !
RewriteEngine on
RewriteCond $1 !(panel|manage)
RewriteRule ^(.*)$ http://localhost/choosefitness/main/$1 [R=301,L]
RewriteEngine on
RewriteCond $1 !^(index\.php|admin|css|img|js|less|favicon.ico)
RewriteRule ^(.*)$ index.php/$1 [L]
, , http://localhost/choosefitness/first-argument /panel /manage. 301 /main/( URL- 301 , /$1)
, , admin css img js lss favicon.ico, . else index.php( index.php url )
, , , . , , /css beign, | css RewriteCond. css, .