mod-rewrite remove folder name from url

后端 未结 1 1807
心在旅途
心在旅途 2021-01-13 01:00

I am using OJS and I have installed it inside a folder called \"journals\". I have created some journals there (for example \"journal1\", \"journal2\", etc).

Now I a

相关标签:
1条回答
  • 2021-01-13 01:24

    When you put those rules inside the htaccess file in your /journals directory, it's causing a rewrite loop. $1 never starts with journals because you're inside the journals directory, thus the rule keeps getting applied.

    You'll need to put something like this in your htaccess file in your site-root, the / directory:

    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/journals
    RewriteRule ^index\.php(.*)$ /journals/index.php$1 [L]
    
    0 讨论(0)
提交回复
热议问题