2

I am trying to hide the /watch/ from the following link:

url = localhost/main/example.com/watch/web-portfolio/

So that it appears like:

url = localhost/main/example.com/web-portfolio/

I've tried searching through the net but couldnot find the solution. I've tried following:

RewriteCond %{THE_REQUEST} \ /+watch/
RewriteRule ^watch/(.*)$ /$1 [L,R=301]

Also tried

RewriteRule ^((?!watch/).*)$ watch/$1 [NC,L]

And others too but didn't work.

Cœur
  • 32,421
  • 21
  • 173
  • 232
nasor
  • 371
  • 3
  • 13
  • What is location of this .htaccess file? – anubhava Dec 24 '14 at 07:28
  • .htaccess is in example.com directory @anubhava – nasor Dec 24 '14 at 09:43
  • You mean it's in `/main/example.com/.htaccess` file? If yes then what happens when you enter: `localhost/main/example.com/web-portfolio/` in browser? – anubhava Dec 24 '14 at 09:48
  • @anubhava Yes .htaccess file is in localhost/main/example.com/.htaccess . As I 've tried various code some of them gave internal error while some codes have no effect at all – nasor Dec 25 '14 at 04:57
  • ok but you have shown one rule in question. Better you create a new question and post full .htaccess. Also add what's working and what's not. – anubhava Dec 25 '14 at 05:01

0 Answers0