Note that there are some explanatory texts on larger screens.

plurals
  1. POURL rewrite for admin exclude directory
    text
    copied!<p>I have a URL rewrite setup to create nice URLs</p> <pre><code>RewriteCond %{REQUEST_URI} !^\/*(index\.php|blog|admin\/assets|site\/assets|robots.txt|sitemap.xml|products.xml|favicon\.ico) RewriteRule ^(.*)$ /index.php?rq=$1 [L,QSA] </code></pre> <p>When I access the admin area with <code>/admin</code> the URL is rewritten as <code>/admin/?rq=admin</code> because I have a root level directory named "admin". It's probably pretty simple, but how can I edit (or add to) my .htaccess rules so that the url is written cleanly as <code>/admin/</code></p> <p>UPDATE: To clarify, I want to access /admin using <code>/index.php?rq=admin</code> and not by calling the /admin/index.php</p> <p>Here is my apache virtualhost config:</p> <pre><code>&lt;VirtualHost *:80&gt; ServerAdmin alex ServerName hub ServerAlias hub DocumentRoot /var/www/hub/ &lt;Directory /&gt; Options FollowSymLinks AllowOverride All &lt;/Directory&gt; &lt;Directory /var/www/hub&gt; Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all &lt;/Directory&gt; ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ &lt;Directory "/usr/lib/cgi-bin"&gt; AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all &lt;/Directory&gt; ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" &lt;Directory "/usr/share/doc/"&gt; Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 &lt;/Directory&gt; &lt;/VirtualHost&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload