Home ยป How to change the url with rewrite rule?

How to change the url with rewrite rule?

RewriteEngine On
RewriteCond %{REQUEST_URI} !/(.*).php
RewriteRule ^(.*)$ pages.php?go=$1

RewriteEngine On

   # uncomment the following line, if you are having trouble
   # getting no_script_name to work
   # RewriteBase /

   # default front controller
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^(.*)$ index.php [QSA,L]

/index.php

<script type=”application/javascript” src=”js/somescript.js”></script>

/something/somethingelse

<script type=”application/javascript” src=”/js/somescript.js”></script>

Add Comment

Click here to post a comment

Your email address will not be published. Required fields are marked *