Dumb SEO Questions

(Entry was posted by Jo�o Soares on this post in the Dumb SEO Questions community on Facebook, Tuesday, October 8, 2013).

I removed my .php extension from the url, but this only works on localhost

Hi, I`m with one problem and I came here to ask a little help.

I`m working on web design, and recently I tried to work on friendly url`s.

I removed my .php extension from the url, but this only works on localhost.
On remote server this doesn`t work.

Any help please?

#url   #seotips

This question begins at 04:00:00 into the clip. Did this video clip play correctly? Watch this question on YouTube commencing at 04:00:00
Video would not load
I see YouTube error message
I see static
Video clip did not start at this question

YOUR ANSWERS

Selected answers from the Dumb SEO Questions G+ community.

  • Jim Munro: Hi ;João, you are welcome here. :)<br /><br />I am not an expert and hopefully someone skilled will pick this up but one thing you might verify in the meantime is whether the mod_rewrite module is installed on the remote server.<br /><br />Also, your .htaccess files , are they the same on both servers?
  • William Gomes: Bom Dia  ;es Tuga?<br /><br />Your rule should look something like this right?<br />RewriteCond %{REQUEST_FILENAME}.php -f<br />RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [L, QSA]<br /><br />Also is mod_rewrite turned on, on your remote server? Thats probably the problem.
  • Matthew Stuart: Read this...<br /><br /><br /><br />I think the php needs to be there unless you have got a .htaccess file with mod rewrite activated, so the above link should help you. However, I have followed this a few times, and not once did I manage to get it to work... and in a few instances, I actually shut my website down :D but you just remove the .htaccess file to bring it back.<br /><br />Best of luck if you&#39;re trying this for the first time, it has been my nemesis for years!
  • Jo�o Soares:  ;<br />Yes, the .htaccess it&#39;s the same on local and remote server<br />probably it&#39;s the mod_rewrite on remote server
  • Jo�o Soares:  ;Sim sou :)<br />o meu .htaccess está assim:<br /><br />RewriteEngine on ;<br />RewriteCond %{REQUEST_FILENAME} !-d ;<br />RewriteCond %{REQUEST_FILENAME}\.php -f ;<br />RewriteRule ^(.*)$ $1.php<br /><br />Em servidor local funciona optimamente, no servidor remoto se procurar por exemplo:<br /><br /> ;<br /><br />Dá erro, diz que o ficheiro hi.php não está no servidor, no entanto ele está lá
  • Jo�o Soares:  ;Thanks for your answer, yes, i&#39;m trying this for the first time.<br />Probably it&#39;s the mod_rewrite tha&#39;s disabled on remote server but I&#39;ll check your post.<br />Thanks
  • W.E. Jonk: From the expert panel in this weeks SEO Questions hangout on air on 04:00:00 into the YouTube video: 

View original question in the Dumb SEO Questions community on Facebook, Tuesday, October 8, 2013).

Reference Links

All Questions in this Hangout