M
M
Mikhail Shatilov2014-11-15 15:15:02
htaccess
Mikhail Shatilov, 2014-11-15 15:15:02

How to write a RewriteRule correctly?

The meaning is this:

RewriteEngine On
RewriteBase /
RewriteRule ^js/bower/angular/(.*)?$ /app/vendor/bower/angular/$1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolay Firsov, 2014-11-15
@Niolay_Firsov

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

For example, I wrote code to remove .php. Tell me what exactly do you need?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question